Guardian Programmer's Guide

Table Of Contents
Communicating With Printers
Guardian Programmer’s Guide 421922-014
11 - 36
Sample Program for Using a Printer
!------------------------------------------------------------
! Procedure to display a part record on the terminal
!------------------------------------------------------------
PROC DISPLAY^RECORD;
BEGIN
PRINT^BLANK;
! Display part number:
PRINT^STR("Part Number Is: " & PART^RECORD.PART^NUMBER
FOR PARTSIZE);
! Display part description:
PRINT^STR("Part Description: " & PART^RECORD.DESCRIPTION
FOR PART^RECORD.DESC^LEN);
! Display part supplier name:
PRINT^STR("Supplier: " & PART^RECORD.SUPPLIER
FOR PART^RECORD.SUP^LEN);
! Display quantity on hand:
START^LINE;
PUT^STR("Quantity on hand: ");
PUT^INT(PART^RECORD.ON^HAND);
PRINT^LINE;
! Display unit price:
START^LINE;
PUT^STR("Unit Price: $");
PUT^INT(PART^RECORD.UNIT^PRICE);
PRINT^LINE;
END;