Shop OBEX P1 Docs P2 Docs Learn Events
Need More Variable Space — Parallax Forums

Need More Variable Space

eltonheltonh Posts: 5
edited 2005-08-15 21:16 in BASIC Stamp
I have adequate RAM for my BS2 program but I have run out of variable spaces.·Is there a "variable extender" similar to the RAM extender?

Comments

  • YanroyYanroy Posts: 96
    edited 2005-08-15 19:59
    I don't know what "extender" you're referring to, but I think you're confused.· Variables are stored in RAM.· Could you mean EEPROM?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-08-15 21:02
    There is no variable extender. Conservation is good -- make sure you're not using a Word when you could use a Byte, or using a Byte when you could use a Nib, etc. In 12 years of BASIC Stamp programming I have had exactly one application where I ran out of variables. Since the program had two distinct modes, I saved one set of variables in EEPROM (using WRITE, recovering with READ) while the other mode was in use.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • ManuelManuel Posts: 105
    edited 2005-08-15 21:16
    What i have done to extend my variable space is to recycle variables. What i mean is that when a variable doesnt need to be used again or will be written and has no use for some time, i use it for another purpose.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Best Regards

    Manuel C. Reinhard
Sign In or Register to comment.