Returning the Sculptor error number (sys.Error)ΒΆ

sys.Error,,i4

Sculptor error number

Contains the error number returned from the last executed err = trap. The error numbers are defined by manifest constants in the file $SCULPTOR/include/errors.h. This file may be included in a program by means of an !include declaration.

See errors.h for a list of error numbers and definitions.


EXAMPLE

!include <errors.h>

     open #8, "tempfile" read err = OPENERR

OPENERR:
     switch(sys.Error) {
          case = NO_FILE:
               error "File cannot be accessed"
               break

          case = IN_USE:
               error "Channel already in use"
               break

          ...
     }

RELATED TOPICS

Traps