Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started by: jsj795 on May 08, 2012, 10:04:57 pm
-
I thought this very handy routine should be shared. It's not mine, credit goes to Runer112 and jacobly. They helped me find a really compact way to store the flags in a variable (total of 44 flags per single variable!)
Write these codes as is in the beginning of the program. Make sure you're not in radial mode if you plan to use graph screen.
"iPart(2fPart(Ans2^-θ→r₁
"Ans-2^θ/2r₁→r₂
"Ans+2^θ/2not(r₁→r₃
In order to utilize the above routine, you use these when you need to work with flags
A:r₁(B to get
A:r₂(B→A to reset
A:r₃(B→A to set
So let's say you have 4 flags, and they are in the variable F. In order to see what 3rd flag is, you do:
F:r₁(3
In order to reset (make flag 0) the 2nd flag, you do
F:r₂(2
and so on.
This is a lot better and more efficient, then let's say setting each flag per element in a list.
like, L1(1,0,0,1,1,1,0,1,0,1,1,0,1,0,0
etc. when you can store all that in a single variable as '20148' and extract each flag by using the above method.
Just make sure the value doesn't contain more than 44 flags because after that you will lose accuracy due to how TI handles the number.
-
Actually...
A:r₁(B to get
A:r₂(B→A to reset
A:r₃(B→A to set
Anyway, this is a very useful routine!
-
Actually...
A:r₁(B to get
A:r₂(B→A to reset
A:r₃(B→A to set
Anyway, this is a very useful routine!
Ahhh yes true. I forgot, will edit it in :)