Re: TIB: challenge


[Prev][Next][Index][Thread]

Re: TIB: challenge



How would you write an input command with getKet using Repeat?  I am very interested in finding out how...
 
For instance, rewrite (if you please) this using Repeat instead of While:
:0->A
:While A=0
:getKey->A
:End
 
-Miles Raymond      EML: m_rayman@bigfoot.com
ICQ: 13217756       IRC: Killer2        AIM: KilIer2 (kilier2)
http://www.bigfoot.com/~m_rayman/
----- Original Message -----
From: <-Dave->
To: ti-basic@lists.ticalc.org
Sent: Friday, June 18, 1999 4:51 PM
Subject: Re: TIB: challenge

I think that if you use 'Repeat' statements instead of 'While' ones, that you could avoid the '0->A' initialization.  Can anyone come up with a similar routine for the 89/92 series?
 
On a side note, why the heck did TI choose to not include the 'Repeat' command on the 89?  I'm very pissed since that is one of my most frequently used commands.  Plus, they opted to use the 'true' & 'false' instead of boolean!  What an insult!  I just don't understand how they expect us to come up with complex boolean expressions using nested 'when()' conditions.
 
--Dave <the_Regul8r@bigfoot.com>
 
----- Original Message -----
From: Miles Raymond
To: ti-basic@lists.ticalc.org
Sent: Thursday, June 17, 1999 1:53 AM
Subject: Re: TIB: challenge

While this is true, it will not work with an 89/92/+ calculator because the x=y logic returns either a ''true or a 'false', not a '1' or a '0' like all the rest of the 8x calcs.  (But I assume that we are using an 83 here because of the screen coordinates and the parenthesis after Output)  There are also a few drawbacks with the loop itself:
 
:4->X
:X->Y
:While A<>22            ;assuming that A<>22 to begin with...
:getKey->A
:Output(X,Y," "
:X+(A=26)(X<16)-(A=24)(X>1)->X
:Y+(A=34)(Y<8)-(A=25)(Y>1)->Y
:Output(X,Y,"O"
:End
 
With this loop, you will see not a 'O' on the screen, but a constant flash of 'O' on the screen, and this is where you must decide if you would rather have it constantly flashing, or have the loop be a little less responsive...
 
:4->X
:X->Y
:While A<>22            ;assuming that A<>22 to begin with...
:0->A
:While A=0
:getKey->A
:End
:Output(X,Y," "
:X+(A=26)(X<16)-(A=24)(X>1)->X
:Y+(A=34)(Y<8)-(A=25)(Y>1)->Y
:Output(X,Y,"O"
:End

Follow-Ups: References: