exit with anykey
Author |
Message |
lordfoamy

|
Posted: Thu Feb 14, 2008 11:03 pm Post subject: exit with anykey |
|
|
I had just learned this earlier today but I forgot the code, can anyone help me?
I need to be able to exit from a loop when anykey is pressed
I'm working on a little program to make finding the colours easier for me. Any help would be appreciated |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
HeavenAgain

|
Posted: Thu Feb 14, 2008 11:37 pm Post subject: RE:exit with anykey |
|
|
Quote: Turing: | % The "hasch" program
put "Press any key to stop the dice rolling"
var die1, die2 : int
loop
randint (die1, 1, 6)
randint (die2, 1, 6)
locate (1, 1)
put "You rolled ", die1 + die2
exit when hasch
end loop |
from the turing help manual |
|
|
|
|
 |
lordfoamy

|
Posted: Fri Feb 15, 2008 12:06 am Post subject: Re: exit with anykey |
|
|
thanks, thats helps a lot. I'll be uploading the program when it's done. or just keeping it if i find one on here. |
|
|
|
|
 |
|
|