Sleep: Difference between revisions
Sleep in various BASIC dialents
No edit summary |
(Sleep in various BASIC dialents) |
||
Line 690:
PRINT "Awake!"</lang>
"SLEEP" with no argument will sleep until a button is pressed on the keyboard (including modifier keys such as shift or control). Also, pressing a key while SLEEP is waiting for a specific amount of time (as above) will end the SLEEP.
==={{header|BASIC256}}===
<lang basic256>print "Enter number of seconds to sleep: ";
input ms
print "Sleeping..."
pause ms
print "Awake!"</lang>
==={{header|True BASIC}}===
<lang QBasic>PRINT "Enter number of seconds to sleep";
INPUT ms
PRINT "Sleeping..."
PAUSE ms
PRINT "Awake!"
END</lang>
==={{header|Yabasic}}===
The '''sleep-command''' has many different names: You may write <code>pause</code>, <code>sleep</code> or <code>wait</code> interchangeably; whatever you write, yabasic will always do exactly the same.
<lang yabasic>input "Enter number of seconds to sleep: " ms
print "Sleeping..."
sleep ms
//pause ms
//wait ms
print "Awake!"</lang>
==={{header|Sinclair ZX81 BASIC}}===
|