previous next top complete contents complete index framed top this page unframed
Figure 33–4. $dateAndTime
| PROCEDURE $dateAndTime (PRODUCES LONG INTEGER date,time; OPTIONAL BITS ctrlBits); |
$dateAndTime returns the current date and the time. If possible, it obtains both the date and time at the same instant to guard against the wraparound at midnight that might occur if they were obtained individually.
The valid predefined BITS constants for ctrlBits are $localTime, $gmt, and errorOK.
If $localTime is specified (or if neither $localTime nor $gmt is specified), the local date and time are returned, if available. If $gmt is specified, the GMT date and time are returned, if available.
If errorOK is specified and the date or time is not available, 0L is returned for the unavailable value or values. If errorOK is not specified and the date and/or time is unavailable, the user is prompted for the date and/or time.
MAINSAIL Language Manual, Section 33.4