Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: ClrDraw on December 06, 2013, 08:54:33 pm
-
First question (and I anticipate many ;) this is gonna be hard!) Say I use GetCalc("prgmPRGM",Y1). Now I want to know what {Y1+n} is. I know I can figure out what is is by the decimal, but is there an easy way to show what that token would be in the catalog? Like for example, if the first thing in programPRGM was ClrHome, how do I display it?
When I use Text(0,0,{Y1}>Tok) it displays a string of random characters. When I use Text(0,0,{Y1}r>Tok) it displays ">Rect" which is the wrong token.
-
First, files only work with archived variables, so make sure your call to GetCalc doesn't return 0.
Second, >Tok takes a pointer to a token, not the token itself. Passing Y1 as an argument won't work, so you'll have to copy the byte you want to check in RAM, then display it from there. That will do something like Disp Select(°A,{Y1}->A)>Tok.
-
First, files only work with archived variables, so make sure your call to GetCalc doesn't return 0.
How so? Axe 1.2.2 doesn't seem to do anything differently for me when it's in RAM.
But it doesn't seem to work with mine (I archived PRGM just in case), here's the code:
GetCalc("PRGM",Y1)
{Y1+1}->A
Fix 5
ClrDraw
Text(1,1,Select(°A,{Y1}->A).Tok)
DispGraph
Repeat getKey
End
This displays some things correct, but others incorrect such as MATHPRINT, Fpdf( and Archive.
-
This is because some tokens are 2-bytes tokens that you need to take care of. There is a number of bytes that, if encountered, marks a 2-bytes token, but I don't remember them all.
Also, why do you put {Y1+1} in A if it's to overwrite it with {Y1} two lines later ?
-
For more info about 2-byte tokens, see that topic (http://ourl.ca/19016/349786) for example.