DELAY.REX: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: updated the boxed comments within the REXX program.) |
m (→{{header|REXX}}: updated code to use a return code of 1 if HALTed.) |
||
Line 56: | Line 56: | ||
/* │ or fractional secs.│ */ |
/* │ or fractional secs.│ */ |
||
/* └────────────────────┘ */ |
/* └────────────────────┘ */ |
||
select |
select |
||
when !cms then @cpsleep n "SEC" /*Is this CMS? Use CP SLEEP. */ |
when !cms then @cpsleep n "SEC" /*Is this CMS? Use CP SLEEP. */ |
||
when !tso then call sleep n /*Is this TSO? Use SLEEP cmd. */ |
when !tso then call sleep n /*Is this TSO? Use SLEEP cmd. */ |
||
when !regina then do /*Is this Regina? */ |
when !regina then do /*Is this Regina? */ |
||
if nFrac=n then call sleep n /*whole seconds? */ |
if nFrac=n then call sleep n /*whole seconds? */ |
||
else call beep |
else call beep 32767, nFrac * 1000 /*uses fraction. */ |
||
/* [↑] sound MAY be heard, faint tic.*/ |
/* [↑] sound MAY be heard, faint tic.*/ |
||
end |
end |
||
when !dos then @ping @pingArgs /*Is this DOS? |
when !dos then @ping @pingArgs /*Is this DOS? Use PING command.*/ |
||
otherwise nop /*don't know what this environment is.*/ |
otherwise nop /*don't know what this environment is.*/ |
||
end /*select*/ |
end /*select*/ |
||
return 0 /*return a zero value |
return 0 /*return a zero value (if a function).*/ |
||
halt: return 1 /*return a zero value (if a function).*/ |
|||