Briefly, maximum number of vars?


Closed Thread
Results 1 to 31 of 31

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I would suspect Array overflows.

    All arrays are zero based.
    It's easy to forget that a 32 byte array only goes to 31.

    PBP does not check "Bounds" for arrays.
    And if you go past it, something else gets corrupted.

    With 18F's, banks don't matter with BYTE arrays.
    WORD/LONG array's are a little different.
    <br>
    DT

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    I would suspect Array overflows.

    All arrays are zero based.
    It's easy to forget that a 32 byte array only goes to 31.

    PBP does not check "Bounds" for arrays.
    And if you go past it, something else gets corrupted.

    With 18F's, banks don't matter with BYTE arrays.
    WORD/LONG array's are a little different.
    <br>

    Thanks Darrel.
    Part of my faultfinding included checking for overflow, as well as increasing the size of my arrays, just to be sure.

    The SDFS code variables include several WORD and LONG arrays. You have said that they are handled differently, can you suggest what might be going wrong, and a possible solution ? Would it be wise to force the location of such arrays ? How would that be best achieved ? Could I locate LONG and WORD arrays at the beginning of my code to ensure those variables begin at the start of a page ?

    Is it important to also point out that none of these WORD and LONG arrays are ever used in my code at the moment. I commented out all code which used them, to successfully eliminate the program itself.

    TIA
    Chris
    Last edited by Chris Barron; - 23rd March 2010 at 08:40.

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