Author Topic: On Calc Axe IDE  (Read 2289 times)

0 Members and 1 Guest are viewing this topic.

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
On Calc Axe IDE
« 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.
« Last Edit: December 06, 2013, 08:55:22 pm by ClrDraw »
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: On Calc Axe IDE
« Reply #1 on: December 06, 2013, 09:17:46 pm »
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.

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: On Calc Axe IDE
« Reply #2 on: December 06, 2013, 11:08:28 pm »
Quote
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:
Code: [Select]
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.
« Last Edit: December 06, 2013, 11:08:56 pm by ClrDraw »
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: On Calc Axe IDE
« Reply #3 on: December 07, 2013, 02:50:31 am »
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 ?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: On Calc Axe IDE
« Reply #4 on: December 07, 2013, 03:35:45 am »
For more info about 2-byte tokens, see that topic for example.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s