Anonymous user
DELAY.REX: Difference between revisions
m
added a comment concerning fractional seconds.
m (added whitespace.) |
m (added a comment concerning fractional seconds.) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 16:
<br>Note: when PC/REXX or Personal REXX are used, those REXXes already have a built-in function (BIF), so the '''delay''' subroutine (below) will never be executed, but the REXX '''DELAY''' BIF will be used instead.
=={{header|REXX}}==
<lang rexx> select▼
trace off /*suppress any REXX error messages. */▼
parse arg ! /*obtain all the arguments from the CL.*/▼
▲ select
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 !regina then do /*Is this Regina? */
if nFrac=n then call sleep n /*whole seconds? */
else call beep
/* [↑] sound MAY be heard, faint tic.*/
end
when !dos then @ping @pingArgs /*Is this DOS?
otherwise nop /*don't know what this environment is.*/
end /*select*/
/*══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════*/
|