Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Rollum78 on December 14, 2012, 02:31:31 pm

Title: Using Files (Y0 - Y9) in Axe
Post by: Rollum78 on December 14, 2012, 02:31:31 pm
I have an appVar in Archive and want to compare its first bytes with a string:
Code: [Select]
:.APPARCH
:"TEST"[00]->Str1
:ClrHome
:If GetCalc("appvRANDOM",Y0)         //that Y0 in [VARS] [Y-VARS] [Function]
:!If Equ>String(Y0,Str1)                  //"Invalid File Use"
:Output(0,0,"Erfolg")
:Else
:Output(0,0,"Nichts")
:End
:End
:getkey[sup]r[/sup]
:ClrHome

When i try to compile that i get an "Invalid File Use" error.
Is what i am trying even possible without unarchiving the appVar?
Or would i have to loop through each byte and compare those individually?
Title: Re: Using Files (Y0 - Y9) in Axe
Post by: Hayleia on December 14, 2012, 02:33:34 pm
Well, you can use a for loop, but there is another way to do this without unarchiving the appvar: copy its first bytes (those you want to compare) to a free RAM area and then, use Equ>String on this area :)
(don't forget to put the zero at the end of your copied first bytes ;))

Copy works with files but Equ>String doesn't
Title: Re: Using Files (Y0 - Y9) in Axe
Post by: Rollum78 on December 14, 2012, 02:50:17 pm
Copy works with files but Equ>String doesn't

Thanks! That is helping me a lot :)