Author Topic: Questions with commands  (Read 17778 times)

0 Members and 1 Guest are viewing this topic.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Questions with commands
« on: March 03, 2010, 09:23:09 pm »
I started using Axe today (like five minutes ago).
So, as expected, I r newfeg.

I am having issues with the word NAME in the documentation.
How do you declare a name? And what is meant by VAR?
Because I threw in the variable A to see what it did.
Axe threw back an error. :(

Little help, please?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
Re: Questions with commands
« Reply #1 on: March 03, 2010, 09:51:40 pm »
Im no expert with Axe, but I believe VAR can be replaced with any BASIC variable (A-Z), and maybe more.
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Questions with commands
« Reply #2 on: March 03, 2010, 10:02:13 pm »
Lies and slander, I say!

Any other clarifications?
Because the variable A most definitely threw back an error.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Questions with commands
« Reply #3 on: March 03, 2010, 10:05:48 pm »
i don't see where there is lies and slander. Remember axe is still in dev so bugs can arise

Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
Re: Questions with commands
« Reply #4 on: March 03, 2010, 10:07:54 pm »
Post the code that you are using. Maybe theres something else thats wrong
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Questions with commands
« Reply #5 on: March 03, 2010, 10:20:29 pm »
Supported Vars are A-Z
Supported Names are Pic00-Pic9Z, Str00-Str9Z, and GDB00-GDB9Z (These can also be single numbers)
Supported Labels are 00-ZZ (These can also be single letters/numbers)

By the way, there is a really annoying bug I am trying to fix right now where sometimes when you try to compile the first time, it throws a random error, but if you try again, it will compile correctly.  Perhaps this is what happened?
« Last Edit: March 03, 2010, 10:21:04 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Questions with commands
« Reply #6 on: March 03, 2010, 10:30:52 pm »
Someone reported this IIRC. When this compile error occurs, does the person program runs fine after it compiled successfully? Does random crashes occur?

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Questions with commands
« Reply #7 on: March 03, 2010, 10:46:24 pm »
:A
:Disp >Dec

That's all that I wrote.
And, on the same note...

:[FFFF]->RAWR

Help me with this epic fail of a program.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Questions with commands
« Reply #8 on: March 03, 2010, 11:19:49 pm »
Alright I see the problem here, You are not storing anything to A. Axe isn't as flexible as Basic when it comes to things like Ans.  To dsplay the number in A, you would do

:Disp A>Dec

and to store a number into A, it works just like Basic

:9->A

Note that you can only store integers (whole numbers) from 0 to 63655.  Secondly, with your sprite (i think?) sprites should have at least 16 characters defining them, as sprites are 8x8, and 1 char is needed for every 4 pixels.  And also you store sprites to Picture variables, not names variables.  Like Quigibo said earlier you can have any one picture token followed by either a letter or a number.  So to store a sprite you could do this:

:[FFFFFFFFFFFFFFFF]->Pic1

Which would store a black 8x8 sprite into Pic1

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Questions with commands
« Reply #9 on: March 04, 2010, 01:46:42 pm »
Also, remember that these are not the real A and Pic1 variables from Basic. That's just what we're calling them.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Questions with commands
« Reply #10 on: March 04, 2010, 02:19:29 pm »
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?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Questions with commands
« Reply #11 on: March 04, 2010, 04:14:23 pm »
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.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Questions with commands
« Reply #12 on: March 04, 2010, 07:11:09 pm »
Oooohhh.
That clarification JUST made Axe that much better.
:D
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Questions with commands
« Reply #13 on: March 04, 2010, 09:46:32 pm »
it was alerady good before the clarification you know lol  :P

Just probably not as clear to everyone for that part

Offline chucktheduck

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Questions with commands
« Reply #14 on: February 18, 2022, 01:16:23 pm »
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