Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 75
Sample Command-Interface Program
!------------------------------------------------------------
! Procedure to write a message on the terminal and check
! for any error. If there is an error, the procedure tries
! to write a message about the error and the program is
! stopped.
!------------------------------------------------------------
PROC WRITE^LINE(BUF,LEN);
STRING .BUF;
INT LEN;
BEGIN
CALL WRITEX(TERMNUM,BUF,LEN);
IF <> THEN CALL FILE^ERRORS(TERMNUM);
END;