Calculator Community > Axe

Questions with commands

<< < (3/4) > >>

Raylin:
Intriguing.
As I began to delve into the code that makes the starship move, I think I stumbled upon what Quigibo meant by NAME int the documentation.
I think he meant that if you put a letter after the variable (like Pic1, Str1) makes the variable a NAME...

I don't know. Correct me if I'm wrong.
Now, I'm trying to figure out how to use bytes in my game...
Will screwing up the syntax or the name of the byte RAM clear me?

Quigibo:
A "NAME" is basically a static pointer to data, meaning that once you store some data, like a string or sprite, you can refer to that data again using it's name.  Please remember, the variables and names have NOTHING to do with the variables that Basic programs use.  Pic1 is just a NAME , it doesn't mean the picture that's in the calculator.

Have you ever programed in other languages?  In practically all other languages, they don't come with predefined variables like "A" or "Str1" you have to declare them on your own.  Like in C, if you want to create a variable to keep track of the time, you might have to do this:

int time = 20

The word "time" isn't referring to the system clock or some other actual quantity of time.  Instead, you are defining it yourself to mean whatever you want!  You could have called it "pizzas" if you want, since the meaning is simply the meaning you give to it.

Now in Axe Parser, since the calculator has to compile the code, but doesn't have a lot of memory to store long names, only short names are allowed.  In fact, they have to be so short that you only get 1 type, 1 number and 1 letter/number.  So if you had a string you want to name, you would do this:

"Hello World"->Str1

Just like "time" in the previous example, Str1 isn't the system Str1, its just a name and it could have been anything.  If you want, you can do this:

"Hello World"->Pic1
Disp Pic1

And it will be exactly the same as if you called it Str1.  There is no difference, its just a name.  That's why I call it a NAME instead of separate PICS, STRINGS, and GDB variables, because they're all identical.  Tacking on extra letters just makes a longer name, that's it.

Raylin:
Oooohhh.
That clarification JUST made Axe that much better.
:D

DJ Omnimaga:
it was alerady good before the clarification you know lol  :P

Just probably not as clear to everyone for that part

chucktheduck:
hello
i just started using axe yesterday and wrote a simple program, and don't understand how "if" works. I've come here from Ti basic
here is my code
input"BRUH"->Str1
"BRUH"->Str2
GetCalc(Str2)->A
GetCalc(Str1)->P
If P=A
Disp"YAY"
End
!If P=A
Disp"NO"
End

I want it to only display "YAY" when "BRUH" is input, but for some reason it always outputs "YAY" no matter the input.
i am confused

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version