Shop OBEX P1 Docs P2 Docs Learn Events
Variables clashing — Parallax Forums

Variables clashing

HughHugh Posts: 362
edited 2014-06-09 06:06 in Propeller 1
Hi,

I'm pretty sure that a couple of variables are being stumbled over in hob-nailed boots by others. Other than by trial and error is there a preferred/logical way to attack this, i.e.,
  • Using the prop tool is there any way to find out which variables are adjacent or are variables mapped in the order they are declared?
  • Could this problem be affected by the stack space I have declared?
  • Am I right in thinking that stack space is actually included in the 'free' space shown by F8? If so, it would be handy if the Prop Tool gave a 'Prop Full' warning!
Thanks
Hugh

Comments

  • T ChapT Chap Posts: 4,223
    edited 2014-06-09 05:47
    Increase stack space and retest. You can always put a test value right after the stack space and check it for any changes
    VAR   Long   stack1[32], test1, stack2[40], test2
    
    PUB Teststackoverflow
           If test1 <> 0
              'show the error
          If test2 <> 0
             'show the error
    
    

    This will show you if your stack is exceeding it's boundaries. Are your variables that are getting overrun directly following a stack?
  • Mike GMike G Posts: 2,702
    edited 2014-06-09 06:00
    Write the memory values in question to the terminal and verify.
  • HughHugh Posts: 362
    edited 2014-06-09 06:06
    Excellent suggestions.
    Thank you
Sign In or Register to comment.