Calculator Community > The Axe Parser Project

GDB vs Pic

<< < (2/2)

Streetwalrus:
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.

johnbchron:
So it would make more sense to say

--- Code: ---blah blah -> °86EC

--- End code ---
which would put it in L1?

E37:
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

Streetwalrus:
That's a good explanation of it, thanks for doing my job. :P

E37:

--- Quote from: Streetwalrus on March 26, 2018, 12:02:21 pm ---That's a good explanation of it, thanks for doing my job. :P

--- End quote ---
Are there positions open there?  ^-^

Navigation

[0] Message Index

[*] Previous page

Go to full version