1. [DOS] How to code for a time delay?
- Posted by Alex Caracatsanis <sunpsych at ncable.com.au> May 27, 2007
- 697 views
Suppose I wanted to display a row of stars on the screen in sequence, each appearing (let's say) 1 second after the previous star, eg: "*" <wait 1 sec> "*" <wait 1 sec> "*" <wait 1 sec> "*" ... Is there a routine that will do this - eg time()? tick_rate()? Any hints appreciated! Alex Caracatsanis
2. Re: [DOS] How to code for a time delay?
- Posted by Bernie Ryan <xotron at bluefrog.com> May 27, 2007
- 683 views
Alex Caracatsanis wrote: > > Suppose I wanted to display a row of stars on the screen in sequence, each > appearing (let's say) 1 second after the previous star, eg: > "*" <wait 1 sec> "*" <wait 1 sec> "*" <wait 1 sec> "*" ... > > Is there a routine that will do this - eg time()? tick_rate()? > > Any hints appreciated! > > Alex Caracatsanis Alex:
while 1 do sleep(1) -- sleep 1 second if get_key() = 113 then -- "q" to quit. use key.bat to find out the code for the key. exit else puts(1,".") end if end if end while
Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
3. Re: [DOS] How to code for a time delay?
- Posted by Bernie Ryan <xotron at bluefrog.com> May 27, 2007
- 666 views
Alex: Whoops ! hit the enter too fast .
while 1 do sleep(1) -- sleep 1 second if get_key() = 113 then -- "q" to quit. use key.bat to find out the code for the key. exit else puts(1,".") end if end while
Bernie Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
4. Re: [DOS] How to code for a time delay?
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> May 27, 2007
- 660 views
Bernie Ryan wrote: > if get_key() = 113 then -- "q" to quit. use key.bat to find out the code for > the key. A better way to write this is if find(get_key(),"qQ") then. BTW, 113='q'. Regards, Pete