Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Yeong on September 10, 2011, 05:32:56 pm

Title: How to make axe program stores/loads from external var?
Post by: Yeong on September 10, 2011, 05:32:56 pm
Is it possible to write a program that takes a variable A from actual calc and store it to var A in calc?
EDIT: If it's possible, how do I do it?
Title: Re: How to make axe program stores/loads from external var?
Post by: Darl181 on September 10, 2011, 05:35:39 pm
You mean, like the TIOS vars A-Z, that basic uses?  I think it's 2nd+7 (the u), then the letter.  It shows it that way in the documentation at least.
EDIT:
Quote from: Documentation.pdf
"prgmABC"
"appvABC"
"grpABC"
"LABC"
"L1"
"varA"
"Str1"
"GDB1"
"Y1"
"[A]"
"Ans"
The Program ABC
The Appvar ABC
The Group ABC (Archive Only)
The List ABC
The List L1
The Real number A
The String Str1
The Graph database GDB1
The Equation Y1
The Matrix [A]
The Ans variable
Title: Re: How to make axe program stores/loads from external var?
Post by: Yeong on September 10, 2011, 05:37:16 pm
so I do AxeVar -> (whatever the u was)A?
Title: Re: How to make axe program stores/loads from external var?
Post by: Darl181 on September 10, 2011, 05:39:32 pm
It seems so.  I think you have to Getcalc() it first, tho.
Title: Re: How to make axe program stores/loads from external var?
Post by: FinaleTI on September 10, 2011, 05:40:49 pm
You would need to do:
Code: [Select]
GetCalc("varA")->P
A->float{P}

Real vars are covered in my external vars tutorial (http://www.omnimaga.org/index.php?action=articles;sa=view;article=58).
Title: Re: How to make axe program stores/loads from external var?
Post by: Yeong on September 10, 2011, 05:42:58 pm
Oh thanks XD
I asked you that because I can't do anything else while running DSC7 curser routine, so I was trying to create my own.
Title: Re: How to make axe program stores/loads from external var?
Post by: Runer112 on September 10, 2011, 05:44:55 pm
You should always have error handling code when dealing with OS variable reading/creating. Here are routines for both directions, with error handling.


OS float to Axe variable:

Code: [Select]
If GetCalc("varA")  .var is the u token found at 2nd+7
float{}→A           .float{ is the fPart( token
Else
.Not found
End

Axe variable to OS float:

Code: [Select]
A→float{GetCalc("varA",7)}
!If  and 0
.Not enough RAM
End
Title: Re: How to make axe program stores/loads from external var?
Post by: Yeong on September 10, 2011, 05:46:00 pm
Thanks for info XD
*Yeong copies thoes down to notepad so he can print and type it in later