Guardian Programmer's Guide

Table Of Contents
Communicating With Printers
Guardian Programmer’s Guide 421922-014
11 - 47
Sample Program for Using a Printer
!------------------------------------------------------------
! Procedure to process an illegal command. The procedure
! informs the user that the selection was other than "r,"
! "u," "i," "p," or "x."
!------------------------------------------------------------
PROC ILLEGAL^COMMAND;
BEGIN
PRINT^BLANK;
! Inform the user that his selection was invalid
! then return to prompt again for a valid function:
PRINT^STR("ILLEGAL COMMAND: " &
"Type either 'r,' 'u,' 'i,' 'p,' or 'x'");
END;
!------------------------------------------------------------
! Procedure to save the Startup message in the CI^STARTUP
! global structure.
!------------------------------------------------------------
PROC SAVE^STARTUP^MESSAGE(RUCB,START^DATA,MESSAGE,
LENGTH,MATCH)VARIABLE;
INT .RUCB;
INT .START^DATA;
INT .MESSAGE;
INT LENGTH;
INT MATCH;
BEGIN
! Copy the Startup message into the CI^STARTUP structure:
CI^STARTUP.MSGCODE ':=' MESSAGE[0] FOR LENGTH/2;
END;