
-----------------------------------
lordfoamy
Thu Feb 14, 2008 11:03 pm

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

-----------------------------------
HeavenAgain
Thu Feb 14, 2008 11:37 pm

RE:exit with anykey
-----------------------------------
% 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
Fri Feb 15, 2008 12:06 am

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.
