Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 109
Accessing an Unlabeled Tape File: An Example
!------------------------------------------------------------
! This is the main procedure
!------------------------------------------------------------
PROC LOGGER MAIN;
BEGIN
STRING CMD;
CALL INIT;
! Loop indefinitely until user selects function x:
WHILE 1 DO
BEGIN
! Prompts for the next 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;
"i", "I" -> CALL SCRATCH^TAPE;
"x", "X" -> CALL EXIT^PROGRAM;
OTHERWISE -> CALL ILLEGAL^COMMAND;
END;
END;
END;