Appvars and programs have just about the same structure when accessed through Axe. They can have names up to 8 characters in length, that do not start with a number. Appvars can contain lowercase letters in their name, and while programs can, it is more common practice for them to have all uppercase names. This is because if a program contains lowercase letters in its name, it cannot be run from the homescreen.
To access an appvar:
GetCalc("appvAPPVAR")→Pointer
Where 'APPVAR' is to be substituted with the name of the appvar you want to access, and Pointer is where you want the data to point to.
For example:
GetCalc("appvAPPVAR")→A
This stores the location in RAM of the appvar APPVAR to the pointer A. You can then access data in the appvar by using pointers as you normally would.
GetCalc("appvAPPVAR")→A
1→{A}
The code above would store 1 to the first byte of the appvar APPVAR.
The code above will only work if the appvar exists and is in the RAM.
Now, if your appvar doesn't exist, you can easily create it by adding a second argument to your GetCalc() command.
GetCalc("appvAPPVAR",Size)→Pointer
Where Size is the size in bytes of the appvar you want to create.
If the appvar exists, but is in the archive, there are a number of things you can do.
You could unarchive it, but if you are only going to read data from it, this is not the best way to do it.
UnArchive "appvAPPVAR"
Most of the time if you do this, you'll have to end up archiving it when you're done with it.
Archive "appvAPPVAR"
This can take more and more time if you haven't GarbageCollected recently, though. However, this does allow you to save your data in the archive.
If you simply want to read data from an appvar, then you could copy it to a file.
GetCalc("appvAPPVAR",File)
Where File is the token for a Y-Var (Y0-Y9).
as of Axe 0.4.6 using files is a little limited, but they are supposed to become more flexible in future versions.
Once the appvar is copied to a file, you can read from it like a pointer.
GetCalc("appvAPPVAR",Y0)
{Y0}→A
This would store the first byte of your appvar to the pointer A.
Once you no longer need an appvar, you can simply delete it.
DelVar "appvAPPVAR"
This will only work if the appvar is in the RAM. If you copied your appvar to a file, you don't need to worry about deleting a file, as ending the program will take care of clearing the file for you. In addition, you can copy an appvar to a file that you previously used with no adverse effects.
GetCalc("appvAPPVAR",Y0)
GetCalc("appvAPPVAR2",Y0)
This would copy the appvar APPVAR to file Y0, then copy the appvar APPVAR2 to file Y0. Accessing file Y0 would then allow you to access the data in APPVAR2.
Please note that data cannot be stored to files, merely read from files.
Programs can be accessed exactly the same way as appvars, except that you use the 'prgm' token instead of the 'v' you get from [2nd]+[8] (which becomes 'appv' with the Axe Tokens).