0 Members and 1 Guest are viewing this topic.
How do you store an entire list in AXE as an appvar?not {L1} but the entire L1
Quote from: pimathbrainiac on February 22, 2013, 12:08:52 pmHow do you store an entire list in AXE as an appvar?not {L1} but the entire L1By the fact you said "list", I fear you haven't unserstood the difference between "pointer" and "variable".Anyway, here is a working code."appvNAME"→Str0GetCalc(Str0,768)→A!If .the appvar was not created, maybe you don't have enough RAM .in this case, maybe the program should exit safely instead of copying random bytes to a random placeEndCopy(L1,A,768).you can unarchive the appvar here if you wantOf course, if you don't use the full 768 bytes of L1, you can make a smaller appvar and copy less than 768 bytes.edit For a complete tutorial on how to use appvars (among other things), see this tutorial and give +1s to FinaleTI
The steps are as follows :Create your appvar using GetCalc(appvarName,size), where in this case size should be 768 since you want to store L1 which is 768 bytes large. The GetCalc function returns a pointer on the appvar, so keep it in a variable.Example : you want to create the appvar called LIST which is 768 bytes large and to store his address into P. You'll do something like :GetCalc("appvLIST",768)→P. Don't forget that "appv" must not be typed by hand, but by pressing [2nd] [8].Use Copy(pointer1, pointer2,size) to copy the 'size'th first bytes starting at 'pointer1' into the 'size'th first bytes starting at 'pointer2'.In this case, since you want to copy the first 768 bytes from L1 to your appvar P, you'll do Copy(L1,P,768). But if you don't specify any size, Axe will automatically make it 768, so you can also optimize this line by Copy(L1,P).That's all, if you don't understand something just ask