Omnimaga
Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: The VFX Wizard on March 21, 2018, 09:57:30 pm
-
I was wondering what the difference was between GDB and Pic as they seem to do the exact same thing and use the same hex codes. Is there a time you would use GDB over Pic? Thanks!
-
They're functionally the exact same thing, it's just a matter of semantics. It's the general consensus to use Pic* for sprites and other graphical data, and GDB* for other types of data. But nothing beats using custom names with the ° symbol in terms of readability.
-
I'm sorry, I don't know what you mean by the degree symbol.
-
I'm sorry, I don't know what you mean by the degree symbol.
Search for °VAR in https://axe.eeems.ca/Commands.html
-
Wait a sec, so you can type:
15 -> °FOO
and it will store to foo?!?
-
Yes, though that is a constant. You can make that constant a memory location and use it as a pointer, or use it just like Pic*, GDB*, and others.
-
So it would make more sense to say
blah blah -> °86EC
which would put it in L1?
-
The o means that what follows is the memory location not the variable. {oA}r is exactly the same as A. It lets you make custom variables.
:L5->oVariableName
:25->VariableName
:Disp VariableName>Dec
In fact, VariableName can be anything you want! It can be as long as you want and contin numbers and lowercase letters as long as it doesn't start with a lowercase letter or number. You can also make as many as you want! (There is tecnically a limit but you will never hit it) These custom named variables can be used in ANY situation you could have used an Alpha variable. Note that each one takes up two bytes so if you place one at L5 then the next one should be placed at L5+2 and so on. There is no reason not to use them. They are just as fast as Alpha variables. In fact, the only difference between a custom named variable and the Alpha variables is the space they take up in the source code.
The o can be used for data also.
:"Im a string!"->oVariableName
:Disp oVariableName
Is the exact same as
:"Im a string!"->Str1
:Disp Str1
Notice that you need the o when it points to data. The symbol means that you want to use it as a constant and not a variable just like GDB or Str. It is useful for constants also. If you need map width and height in your program but don't need them to change while it is running make them constants. That way if you need to change the dimensions of the map, all you have to do is change the one line where they are declared.
Sorry I'm a bit late to the party... :P
-
That's a good explanation of it, thanks for doing my job. :P
-
That's a good explanation of it, thanks for doing my job. :P
Are there positions open there? ^-^