Guardian Programmer's Guide

Table Of Contents
Formatting and Manipulating Character Data
Guardian Programmer’s Guide 421922-014
19 - 24
! Check for errors:
IF ERROR <> 0 THEN
BEGIN
START^LINE;
CASE ERROR OF
BEGIN
267 -> PUT^STR("Buffer Overflow");
268 -> PUT^STR("No Buffer");
270 -> PUT^STR("Format Loopback");
271 -> PUT^STR("EDIT Item Mismatch");
272 -> PUT^STR("Illegal Input Character");
273 -> PUT^STR("Bad Format");
274 -> PUT^STR("Numeric Overflow");
OTHERWISE -> PUT^STR("Unexpected Error");
END;
PRINT^LINE;
CALL PROCESS_STOP_;
END;
! Print the contents of the buffers on the terminal:
I := 0;
WHILE I < NUM^BUFFERS AND BUFFER^ELEMENTS[I] >= 0 DO
BEGIN
CALL WRITEX(TERM^NUM,BUFFERS[I],BUFFER^ELEMENTS[I]);
I := I + 1;
END;
END;