1. delay()

------=_NextPart_000_0022_01BEB7DB.586FDF00
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Coded a simple utility that I miss from basic--it delays execution for a =
specified number of seconds:

global procedure delay(atom seconds)
    atom t1,t2
    t1=3Dtime()
    t2=3D0
    while t2<seconds do
        t2=3Dtime()-t1
        if t2<0 then t2+=3D86400 end if  --midnight wraparound for DOS32
    end while
end procedure

--Mike Nelson


------=_NextPart_000_0022_01BEB7DB.586FDF00
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Coded a simple utility that I miss =
from=20
basic--it delays execution for a specified number of =
seconds:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>global procedure delay(atom seconds)</FONT></DIV>
<DIV><FONT size=3D2></FONT><FONT color=3D#000000 =
size=3D2>&nbsp;&nbsp;&nbsp; atom=20
t1,t2</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; =
t1=3Dtime()</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; =
t2=3D0</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; while =
t2&lt;seconds=20
do</FONT></DIV>
<DIV><FONT color=3D#000000 =
t2=3Dtime()-t1</FONT></DIV>
<DIV><FONT color=3D#000000 =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if=20
t2&lt;0 then t2+=3D86400 end if&nbsp; --midnight wraparound for =
DOS32</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; end =
while</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>end =
procedure</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>--Mike Nelson</FONT></DIV>

------=_NextPart_000_0022_01BEB7DB.586FDF00--

new topic     » topic index » view message » categorize

2. Re: delay()

------=_NextPart_000_000D_01BEB90E.651E0720
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks for the delay Mike blink
Bye
Martin


------=_NextPart_000_000D_01BEB90E.651E0720
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Thanks for the delay Mike blink</FONT></DIV>
<DIV>Bye</DIV>
<DIV>Martin</DIV>

------=_NextPart_000_000D_01BEB90E.651E0720--

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu