The GNU Modula-2 front end to GCC

gm2-libs-pim/ErrorCode

DEFINITION MODULE ErrorCode ;

(*
    Description: provides a Logitech-3.0 compatible module which
                 handles exiting from an application with an exit
                 value.
*)

EXPORT QUALIFIED SetErrorCode, GetErrorCode, ExitToOS ;


(*
   SetErrorCode - sets the exit value which will be used if
                  the application terminates normally.
*)


PROCEDURE SetErrorCode (value: INTEGER) ;


(*
   GetErrorCode - returns the current value to be used upon
                  application termination.
*)


PROCEDURE GetErrorCode (VAR value: INTEGER) ;


(*
   ExitToOS - terminate the application and exit returning
              the last value set by SetErrorCode to the OS.
*)


PROCEDURE ExitToOS ;


END ErrorCode.