1
Axe / Custom lists
« on: September 30, 2010, 11:38:02 pm »
I'm trying to save a return code to a one element list with a custom name in a subroutine that's called right before exiting. Simply using GetCalc("LAVLIB",1) doesn't seem to do anything, so I've been manually coding the token name (thanks to the 83+ SDK docs). [01]"LAVLIB" (coded using Data() and the transpose symbol with a null byte at the end) screws up the symbol table and crashes the calculator, but [015D]"AVLIB" works--the first time. Then I get "ERR:SYNTAX".
Deleting it first didn't seem to work until I added an extra null byte to the end, and even then it acts weird: it works the first time, then ERR:SYNTAX (but the list got deleted), and then it works again, then it just saves 0 to the only element (even though the correct value, 2, is displayed).
But what's really strange is starting the 4th time(?), as I run it over and over, the free RAM displayed in the Memory menu goes UP, even with the same result, but the list gives an ERR:MEMORY when I try to open it. Calcsys shows a size of 2080.
This is the code that I'm using:
I tried adding the extra null byte when I made the new list and the first time that will work (as in the List menu loads right), but the second time the List menu looks like this:
Is this an Axe bug or my error?
Deleting it first didn't seem to work until I added an extra null byte to the end, and even then it acts weird: it works the first time, then ERR:SYNTAX (but the list got deleted), and then it works again, then it just saves 0 to the only element (even though the correct value, 2, is displayed).
But what's really strange is starting the 4th time(?), as I run it over and over, the free RAM displayed in the Memory menu goes UP, even with the same result, but the list gives an ERR:MEMORY when I try to open it. Calcsys shows a size of 2080.
This is the code that I'm using:
Code: [Select]
Lbl RET
Disp r1>Dec
[015D]->Str0RV
"AVLIB"
[00]
DelVar Srt0RV
[015D]->Str1RV
"AVLIB"
GetCalc(Str1RV,1)->Z
If Z
r1->float{Z}
End
Return
I tried adding the extra null byte when I made the new list and the first time that will work (as in the List menu loads right), but the second time the List menu looks like this:
Code: [Select]
NAMES OPS MATH
1:L1
2:
3:!
and then it's not too hard to do a RAM clear Is this an Axe bug or my error?