Quirkyjim
Quote: "First of all, using
if 1 = spacekey()
won't get any input."
Actually, it does. It is unusual how the iron programmer did it, but the code actually does work. Pressing the SPACEBAR does indeed exit the program.
Quote: "Using something like
if inkey$() = " ""
That does work, but why not just use the built in 'spacekey()' command?
Quote: "Use something more like
goto quit
quit:
end"
There is great division among coders as to whether or not to use goto. I do not want to get into an in-depth debate about it, but you could easily code this so that a goto is unneeded. Like this:
do
print "hello" ;
if inkey$() = " " then exit
loop
end