Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Xeda112358 on April 25, 2012, 08:58:09 pm

Title: SetUpVar
Post by: Xeda112358 on April 25, 2012, 08:58:09 pm
SetUpEditor is one of the most useful commands to BASIC programmers and I have always griped that I could not use it for other variable types like strings and matrices. Guess what I did?

What does it do?
Like the SetUpEditor does for lists, this will check for variables. If the variable doesn't exist, it gets created, or if it is archived, it gets unarchived.

How do I use it?
The line directly after calling this program contains a string of variables. The variable types that work are:
-Strings
-Pictures
-Equations
-Programs
-Matrices
So in practice, what you would do:
Code: [Select]
:Asm(prgmSETUPVAR
:[B],prgmALPHA,Pic2,Pic3,Str1,Str7,[C]
:<<rest of code>>

Notes:
Size? 208 bytes
This will try to work for other variables, but it will fail most likely and it will make you lose RAM and crash.
Title: Re: SetUpVar
Post by: jsj795 on April 25, 2012, 09:07:29 pm
Wow I'm so tempted to use this in my game, but then it would mean my game would be considered more as ASM/BASIC hybrid than pure BASIC :( but for other projects this would be immensely useful!
Title: Re: SetUpVar
Post by: Xeda112358 on April 25, 2012, 09:26:28 pm
Hehe, thanks :3 I threw this one together today after getting the idea over on TIBasicDev. I was talking about how awesome SetUpEditor is when I decided to finally make this. :)