Re: TIB: Faster Getkey??? (was GetKey)


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

Re: TIB: Faster Getkey??? (was GetKey)





On Fri, 4 Dec 1998 22:35:29 -0500 "The Kellers" <sandia@rocler.qc.ca>
writes:
>
>Here's the fastest thing I see to your proposition(look, no goto, no
>subprograms :-) )
>
>Repeat 0
>Repeat Ans
>Getkey
>End
>If Ans = 105
>then
>Disp"Hi
>Pause
>End

To save bytes, replace above IF loop with
  :IF Ans=105
  :Pause "HI

>If Ans = 22
>Stop
>End
>
>Philipp Keller

I also think this is the fastest Getky routine you can make.  It clocks
about 16 to 17 cycles per second, as apposed to about 9.5 c/sec for  a
LBL/GOTO loop with the IF's enclosed in the loop.  Also, this
REPEAT-based routine should perform at the same speed anywhere in the
program.

~Philip
-----------------------------
pmadsen@juno.com
-----------------------------
___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]