Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (D-E)
Guardian Procedure Calls Reference Manual—522629-013
4-25
DEFINEMODE Procedure
old-value output
INT:ref:1
if present, returns the previous status of the DEFINE mode: 0 (OFF) or 1 (ON).
Considerations
•
The new-value and old-value parameters correspond to the DEFMODE
attribute of a process:
DEFMODE OFF corresponds to value 0;
DEFMODE ON corresponds to value 1.
•
If new-value is not supplied, the call to DEFINEMODE does not change the
current value of DEFINE mode.
•
When a process is created, the DEFINE mode for the new process can be
supplied as an option to PROCESS_CREATE_, PROCESS_SPAWN_,
NEWPROCESS, NEWPROCESSNOWAIT, OSS
tdm_fork(), OSS
tdm_spawn() or one of the OSS tdm_exec set of functions, or to the command
interpreter RUN command. The default is the DEFINE mode of the caller of the
procedure that creates the new process or that of the command interpreter.
•
The DEFMODE of a primary process is checkpointed to the corresponding backup
process whenever the primary process calls CHECKPOINT or
CHECKPOINTMANY to checkpoint the data stack.
•
See the Guardian Programmer’s Guide for details on DEFINE mode and its effects.
Example
INT previous^use;
LITERAL define^mode = 1;
.
.
.
error := DEFINEMODE( define^mode, previous^use );
IF error <> DEOK THEN ...
! The above statements enable DEFINE use and return
! the previous DEFINE mode in the variable
! previous^use.
Related Programming Manual
For programming information about the DEFINEMODE procedure, refer to the
Guardian Programmer’s Guide.