varable index buffer setup unsing a varable


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: varable index buffer setup unsing a varable

    Allocation of memory is done at compile time - not during runtime. Hence the content of a variable can not dictate the size of an array since the content of a variable, by definition, can change during runtime while the size of the array is allocated at compile time.

    You really can't resize arrays at runtime like what you're suggesting/expecting.

    Can you elaborate on what problem is is you're trying to solve?

    /Henrik.

  2. #2
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: varable index buffer setup unsing a varable

    hi hendric

    its an exiting program that uses named constants to set the buffer size , the same named constants are used in multi locations to set other variables and math

    problem is now need to set those named constants to be variables , which is ok for all , except setup the size of array bytes


    i dont want to change all the code just for this issue , but not sure how i can get arround it nicely

    cheers sheldon

Similar Threads

  1. HSERIN string starting index ?
    By gunayburak in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 4th July 2016, 22:54
  2. strange word varable array results
    By longpole001 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 26th October 2015, 00:01
  3. Index a bit through a portion of a port
    By ecoli-557 in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 12th March 2012, 22:22
  4. How to index Port variable
    By jpadin1 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th February 2010, 10:36
  5. Access pin using index
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 16th October 2008, 02:34

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts