IB Statements/wakeup

From CometWiki

Jump to: navigation, search

WAKEUP statement

Syntax: WAKEUP time-string

Discussion: The WAKEUP statement suspends processing of the current program until a specified "wakeup time."

The time-string parameter may be a string constant, a single-element string variable, a string array element, a string expression, or a string function in the format "HH:MM:SS" (where "HH" indicates the hour, "MM" indicates the minute, and "SS" indicates the second for the current program to resume processing).

The partition running a suspended program will show the program as active even though its processing has been suspended. No other jobs may be executed in this partition while the original program is suspended.

Application note: The WAKEUP statement does not require system resources and is preferred over other processing suspension methods, such as repetitive looping.

History

Starting with Comet version 504.211, the target time and current time are written to the system buffer (#) on the exit from a WAKEUP. This was added primarily as an internal debugging tool, but please note that the contents of the system buffer contain this data when the WAKEUP statement is executed.

Example:

LENGTH 2 & LOCAL FLAG$
 .
 CLEAR
 .
 WAKEUP "21:30:00"
 .
 .
 .

In the above example, the program will suspend processing as soon as it encounters the WAKEUP statement. The program will resume processing at 9:30 p.m.

Personal tools