Guardian Programmer's Guide

Table Of Contents
Formatting and Manipulating Character Data
Guardian Programmer’s Guide 421922-014
19 - 33
List-Directed Formatting
! Check for errors. If invalid input then retry, otherwise
! stop:
IF ERROR <> 0 THEN
BEGIN
START^LINE;
CASE ERROR OF
BEGIN
267 -> PUT^STR("Buffer Overflow");
272 -> PUT^STR("Illegal Input Character");
OTHERWISE -> BEGIN
CASE ERROR OF
BEGIN
268 -> PUT^STR("No Buffer");
270 -> PUT^STR("Format Loopback");
271 -> PUT^STR("EDIT Item Mismatch");
273 -> PUT^STR("Bad Format");
274 -> PUT^STR("Numeric Overflow");
OTHERWISE -> PUT^STR("Unexpected Error" &
"Number");
END;
PRINT^LINE;
CALL PROCESS_STOP_;
END;
END;
PRINT^LINE;
START^LINE;
PUT^STR("Reenter Your Data ");
PRINT^LINE;
PRINT^BLANK;
GOTO PROMPT^AGAIN;
END;
END;