OS/2 Procedures Language 2/REXX


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


CONDITION




 >>---CONDITION(-+--------+-)--------><
                 +-option-+

CONDITION returns the condition information associated with the current 
trapped condition.  You can request four pieces of information: 
   o  The name of the current trapped condition 
   o  Any descriptive string associated with that condition 
   o  The instruction executed as a result of the condition trap (CALL or 
      SIGNAL) 
   o  The status of the trapped condition. 
 
 The following options (of which only the capitalized letter is needed, 
 all others are ignored) can be used to obtain the following information: 
 Condition name    Returns the name of the current trapped condition. 
 Description       Returns any descriptive string associated with the 
                   current trapped condition. If no description is 
                   available, a null string is returned. 
 Instruction       Returns the keyword for the instruction executed when 
                   the current condition was trapped.  The keywords are 
                   CALL or SIGNAL. This is the default if you omit option. 
                   
 Status            Returns the status of the current trapped condition. 
                    This can change during execution, and is either: 
      ON - the condition is enabled 
      OFF - the condition is disabled 
      DELAY - any new occurrence of the condition is delayed. 
 
 If no condition has been trapped (that is, there is no current trapped 
 condition) then the CONDITION function returns a null string in all four 
 cases. 
 Here are some examples: 

 CONDITION()            ->    'CALL'        /* perhaps */
 CONDITION('C')         ->    'FAILURE'
 CONDITION('I')         ->    'CALL'
 CONDITION('D')         ->    'FailureTest'
 CONDITION('S')         ->    'OFF'        /* perhaps */
 
 
 
 Note:    The condition information returned by the CONDITION function is 
          saved and restored across subroutine calls (including those 
          caused by a CALL ON condition trap). Therefore, once a 
          subroutine invoked due to a CALL ON trap has returned, the 
          current trapped condition reverts to the current condition 
          before the CALL took place. CONDITION returns the values it 
          returned before the condition was trapped. 
   

Inf-HTML End Run - Successful