Omnimaga
Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: benedikt.muessig on May 29, 2014, 12:23:14 pm
-
Hello,Theres no proper documentation for axe, no good tutorial. :banghead:
I need help!!!!
I'm making a game and want to name vars.
I heard about naming vars with 5 letters.
How can I do this,
e.g. KNN0X and KNN0Y
I have multiple sprites and want have the format nameofspriteX and ~Y.
I have just no idea how to deal with variables i need more than A-Z and a need no constants.
-
If you want your variable to use the first two bytes of L1, do L1->°NAME, where NAME is the name of your variable (duh), which can be up to 13 characters. Then just use NAME as a normal variable.
It's true that there is no good tutorial, but the Commands.html file is very complete as a documentation and I learned most of Axe with it.
-
Oh, THAT is how you do that, always wondered how xD
-
Yep it is. :P
-
And you can use up to 13 characters in variable names, not just 5 ;)
-
And you can use up to 13 characters in variable names, not just 5 ;)
You're late to the party, I already helped him on IRC. :P Turns out he needed an array.
Also read my post closer.
-
And how can one use the variable as a variable and not a pointer to something? (use its adress or something like this to avoid using using Lx areas)
-
And you can use up to 13 characters in variable names, not just 5 ;)
You're late to the party, I already helped him on IRC. :P Turns out he needed an array.
Also read my post closer.
Sorry, was tired -.-
And how can one use the variable as a variable and not a pointer to something? (use its adress or something like this to avoid using using Lx areas)
That doesn't mean anything. The variable is not a pointer. Its value is pointed by a pointer (no joke!) but once you did "L5+04→°Wattouat", Wattouat is the value, not the pointer which is °Wattouat.
Moreover, A, B, etc also have pointers, which are °A, °B, etc so if you think you are using pointers with Wattouat, you are doing it too with A, B, etc.
Last of all, nothing prevents you from not using Lx ram areas by using other free ram areas (http://www.omnimaga.org/asm-language/8384-free-ram-areas/msg306283/#msg306283).
-
Okay, so I need to allocate to the custom variable an area. Thanks.
-
Yeah, you just say "this variable will use those two bytes" and you give a pointer to two bytes. Whatever that pointer is. You can even do °A→°ThisIsA if you
like useless things are using A for two different purposes in two different parts of your code and want it to have two names.