Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 69
Writing the Program
!------------------------------------------------------------
! This is the main procedure.
!------------------------------------------------------------
PROC LOGGER MAIN;
BEGIN
CALL INIT;
! Loop indefinitely until user selects function x:
WHILE 1 DO
BEGIN
! Prompts for the function to perform:
CMD := GET^COMMAND;
! Call function selected by user:
CASE CMD OF
BEGIN
"r", "R" -> CALL READ^RECORD;
"a", "A" -> CALL APPEND^RECORD;
"c", "C" -> CALL APPEND^RECORD;
"x", "X" -> CALL EXIT^PROGRAM;
OTHERWISE -> CALL ILLEGAL^COMMAND;
END;
END;
END;