ACTIVATE TIMER


PLBCMP GUI Only

 

The ACTIVATE TIMER statement initiates a TIMER countdown. An optional execution label may be provided to process information if the TIMER expires. The instruction uses the following format:

 

 

[label]

ACTIVATE

{timer}[,{routine},{result}]

 

Where:

label

Optional. A Program Execution Label.

timer

Required. The name of a previously created TIMER object variable or a pointer to a TIMER object.

routine

Optional. A program execution label called when a mouse click occurs within the screen boundaries of the object.

result

Optional. A previously defined Numeric Variable in which the result code as described below is placed upon object selection.

Flags Affected: NONE

Note the following:

  1. The runtime performs no default action for TIMER objects.

  2. If the {result} operand is specified, it is set to one.

  3. The {routine} is called when a the TIMER expires.

  4. The {routine} is called as if a CALL instruction was performed. It is only called when an EVENTCHECK or EVENTWAIT is executed.

  5. When the {routine} is complete, a RETURN instruction continues execution at the instruction following the EVENTWAIT or EVENTCHECK. Otherwise, a NORETURN instruction should be executed to clear the return address from the call stack.

  6. If the object specified by an ACTIVATE instruction is already active, the old {routine} and {result} operands are replaced with the new {routine} and {result} operands.

  7. An object must be CREATEd before it is activated. If this is not done, a runtime error of O105 is generated.

  8. If insufficient memory is available to perform the operation, a runtime error O106 is generated.

  9. If a FILEPI instruction is active, it is terminated.

 

 

See Also: Example Code, ACTIVATE, DEACTIVATE, Object Output Instructions

 



PL/B Language Reference ACTIVATE TABCONTROL ACTIVATE TOOLBAR