Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By plomako
#65770 Hi,
ESP Basic became my favorite programing language! I just love it. But every time when working on bigger projects I hit the ceiling because of the limit in number of variables. I'm aware that introducing local/global variables would be against Basic principles ;) , but please - give me a way to do a memclear without deleting some "global variables".

Anything will be highly appreciated!

Some ideas:
global X = 66 'X will survive memclear
memclear Y 'Just Y will be removed to free one variable

Thx and good luck!
/Marcin
User avatar
By Mmiscool
#65846 Currently you could do a MEMCLEAR in conjunction with reading and writing the variables to flash.

See the following. This will store a variable to flash and return in back again after a memclear.
Code: Select allwrite("filename1",myvariable)
memclear
myvariable = read("filename1")