Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: unknownloner on March 31, 2013, 04:01:56 pm

Title: 65535->r6 results in r6 being 0? (Solved)
Post by: unknownloner on March 31, 2013, 04:01:56 pm
Code: [Select]
If r4!=r2
 r4<r2?65535,1->r6
End
FnOff
Disp r6>Dec,i,r2>Dec,i,r4>Dec,i
Repeat getKey(15):End
FnOn
The code above is called within a subroutine. When r4 > r2 is displays r6 as 1. However, when r4 < r2 is displays r6 as 0. In my code I displayed r2 and r4 to make sure that they weren't actually equal. I have a draw interrupt for greyscale:
Code: [Select]
If DrawC++=2
 DispGraph^^r^^r
 0->DrawC
End
Would this be changing the value of r6?
I also tried creating a custom variable and locating it towards the middle of L1, and then using that. That also failed. What am I doing wrong? :banghead:
Title: Re: 65535->r6 results in r6 being 0?
Post by: Deep Toaster on March 31, 2013, 04:15:46 pm
The line
:r4<r2?65535,1→r6
actually means
:If r4<r2
:65535
:Else
:1→r6
:End
What you want is
:r4<r2?65535,1
:→r6
Title: Re: 65535->r6 results in r6 being 0?
Post by: unknownloner on March 31, 2013, 04:54:44 pm
That makes sense, thanks!