Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Camdenmil on November 13, 2010, 12:49:37 am
-
How do you append data to an appvar? If I have appvar A which is 500 bytes, how do I add 100 bytes to the end of it?
-
AFAIK you can't do this with anything simple :(
The best way to do it would be something like...
"appvTemp"⇒Str1
"appvName"⇒Str2
GetCalc(Str1, new size)⇒A
GetCalc(Str2)⇒B
Copy(B,A,old size)
<data>⇒GDB1
Copy(GDB1,A+oldsize, Δsize)
DelVar Str2
GetCalc(Str2, new size)⇒B
Copy(A,B, new size)
DelVar Str1
where appvTemp is a temporary appvar, appvName is whatever appvar you're using and <data> is whatever data you want to add
if there's any easier way to do this, I'd be interested as well ;)
-
AFAIK you can't do this with anything simple :(
The best way to do it would be something like...
"appvTemp"⇒Str1
"appvName"⇒Str2
GetCalc(Str1, new size)⇒A
GetCalc(Str2)⇒B
Copy(B,A,old size)
<data>⇒GDB1
Copy(GDB1,A+oldsize, Δsize)
DelVar Str2
GetCalc(Str2, new size)⇒B
Copy(A,B, new size)
DelVar Str1
where appvTemp is a temporary appvar, appvName is whatever appvar you're using and <data> is whatever data you want to add
if there's any easier way to do this, I'd be interested as well ;)
That's about it, unless Quigibo adds the InsertMem/DeleteMem functions (feature request bump ;D).
-
That's how I was doing it. At least I wasn't missing an obvious command :)