TIB: Faster Getkey??? (was GetKey)


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

TIB: Faster Getkey??? (was GetKey)




How would you mesure speed with that?

It  is too simple, how about this:

Try to write a routine that will move a pixel around on the Graph
Screen with the arrows, Clear the screen if "Clear" is pressed, Print
"Hi" on the graph screen if enter is pressed and Exit if "2nd" is
pressed". And make a button to toggle the moving pixel so you can use
it as a pen one way and it doesn't write the other way. If the pixel
goes off one end of the screen, make it come up on the other end.

Pretty complicated, eh? well not really, if you manage to understand
my bad writing. The hard part is to make it as fast as possible. But
this is a lot more realistic, when you're writing a prog you usually
have to worry about a lot of stuff at once, and make it all go faster.
This is a pretty useless program but I figure that if anyone has some
time to waste, we could try to find the fastest solution, maybe learn
a few cool tricks along the way, heck knows! Anyway, I'm gonna try
this later tonight, and I'll post it. All this talk about "Fast
Getkey" is making me wanna find a faster way.

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

If Ans = 22
Stop

End

Philipp Keller

>Yeah, I know.  Just a simple:  If 22 is pressed, exit.  If 105 is
pressed,
>display 'Hi',pause, then go back to the loop,etc...
>
>Dan
>
>
>In a message dated 12/4/1998 4:47:15 PM Mountain Standard Time,
>sandia@rocler.qc.ca writes:
>
><< ...that uses the getkey to do what? Tell me what you want, and
I'll
> try to write something. what type of routine you use depends on what
> it does. >>
>