Computer Science Canada

loops and getching at same time

Author:  poomanchunk [ Sun May 09, 2004 7:04 pm ]
Post subject:  loops and getching at same time

Ok I know theres a way to do this (or think anyways), but I have no idea how to. I want to be able to continue the loop, even through a getch
Like this is what I got
code:
for decreasing count : 15 .. 1
    put count
    getch answer
    if answer is = "a" then
    (and it goes on with the selection)
    end if
end for

Now this is like a counter. BTW i'm trying to make jeopardy, and the 15 is the counter. I want it to keep counting, and if someone presses 'a' then it'll stop.
Can someone plz help me on this.
Thx

Author:  Tony [ Sun May 09, 2004 7:08 pm ]
Post subject: 

code:

if hasch then
getch answer
end if

Author:  poomanchunk [ Sun May 09, 2004 7:38 pm ]
Post subject: 

Hmm.. I haven't learned about hasches yet, I'll have to look into this.
Seems complicated. Anyways thx for the help, I'll see if I can manage to do something.

Edit - Ok I figured it out, wasnt' too hard Smile


: