GetCode Method (ERROR)


10.1, PLBCMP GUI Only

 

The GetCode method retrieves the error code string for an error. This method uses the following format:

 

 

[label]

{object}.GetCode

[GIVING {return}] [USING [*POS=]{position}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. An ERROR object that has been previously declared.

return

Optional. A Character String Variable that receives the error code string.

position

Optional. A Numeric variable or decimal number whose value is a one relative position in the current error stack.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The ZERO flag is set if the {return} value is zero.

  2. The OVER flag is set if the returned value overflows the {return} Numeric Variable.

  3. The EOS flag is always set to FALSE.

  4. This method retrieves the 'Zxxx' error as described in the 'PL/B Runtime Reference' under the 'Runtime Errors' section.

  5. If the {position} parameter is not specified, this method uses the position of the most recent error.

 

 

See Also: Method Syntax, ERROR Methods

 



PL/B Language Reference ClearError Method (ERROR) GetCount Method (ERROR)