1246
TI-BASIC / Undocumented TI-BASIC tricks
« on: November 27, 2005, 01:29:00 pm »
any one think this should be the big talked about command in basic? It alows you to do all kinds of things, from self modifying code to very advanced optimisations.
Ok...this doesn't work...
Here, this one is a bit more complex example
You could store into String1 "1,16(A-1),16(B-1),2,16," and "0,0,0" into String3, and do an asm preproccess to take a matrix and make it into a string of "which pic to use, which row, and which column"
:For(A,0,4
:For(B,0,6
:real(String1+String2+String3
:End
:End
Fixed well...that would work...but it doens't use expr :dang:
************************************************
Ok, if enemy had a defense of 40, and was weak to fire...
"(1st:weak to fire?,2nd:Def,3rd=Health
"1,040,H"->String1
And if attacked
"weilding the Fire Sword of Bonus Damage"
"100*2("+sub(String1,1,1)+")-"+sub(String1,3,3)
expr(H-Ans
Well, that would do a bunch of crap...but H would be -160 as a result of "100*2(1)-040"... :imbeciles:
ok...that example was :beurk:
...but I hope you got the picture
well, discuss...
Ok...this doesn't work...
Here, this one is a bit more complex example
You could store into String1 "1,16(A-1),16(B-1),2,16," and "0,0,0" into String3, and do an asm preproccess to take a matrix and make it into a string of "which pic to use, which row, and which column"
:For(A,0,4
:For(B,0,6
:real(String1+String2+String3
:End
:End
Fixed well...that would work...but it doens't use expr :dang:

************************************************
Ok, if enemy had a defense of 40, and was weak to fire...
"(1st:weak to fire?,2nd:Def,3rd=Health
"1,040,H"->String1
And if attacked
"weilding the Fire Sword of Bonus Damage"
"100*2("+sub(String1,1,1)+")-"+sub(String1,3,3)
expr(H-Ans
Well, that would do a bunch of crap...but H would be -160 as a result of "100*2(1)-040"... :imbeciles:

ok...that example was :beurk:

well, discuss...