Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: boathouse2112 on August 01, 2012, 08:13:20 pm
-
In TI BASIC you can shorten the code a bit by omitting ending parentheses and quotation marks. Is this also possible in Axe or will it get messed up?
-
I believe Axe requires you to close the parentheses. Since it's compiled and not interpreted, I think it ensures proper compilation and execution, else you'll get an error when you go to compile.
-
Leaving off ending parentheses makes no difference in the size of the compiled program (the one that users will actually play), and it can create many bugs if the programmer isn't entirely sure of what he's doing.
For example, look at this code:{L1+5→A
You probably think it's doing the same thing as this:{L1+5}→A
But what it's really doing is this:{L1+5→A}
That's the sort of thing you'll have to deal with if you get in the habit of leaving off parentheses in Axe. So just leave them on—one keystroke will save you a ton of trouble later ;)
-
I remember certain Axe commands would tolerate non-closed parenthesises from time to time, but in some cases, your code would not work. Always close them, because as Deep said, unlike in TI-BASIC, the executable file size won't change if you don't close them.
-
Leaving off ending parentheses makes no difference in the size of the compiled program (the one that users will actually play), and it can create many bugs if the programmer isn't entirely sure of what he's doing.
For example, look at this code:{L1+5→A
You probably think it's doing the same thing as this:{L1+5}→A
But what it's really doing is this:{L1+5→A}
That's the sort of thing you'll have to deal with if you get in the habit of leaving off parentheses in Axe. So just leave them on—one keystroke will save you a ton of trouble later ;)
Oh, that is maybe why I had some axe bugs.........