PDA

View Full Version : Need More Variable Space



eltonh
08-16-2005, 02:58 AM
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?

Yanroy
08-16-2005, 02:59 AM
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 Williams
08-16-2005, 04:02 AM
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

Manuel
08-16-2005, 04:16 AM
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