HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)

480 AppendixA
SAMPLE PROGRAMS
PASCAL
PASCAL
$TITLE ’VPLUS/V Data Entry Sample Program’$
{
This application collects employee payroll deduction transactions
and places the edited transactions into a file.
For this application: Enter key = edit and file transaction;
f8 = exit application;
all other f keys = redo transaction.
Each transaction entered by the operator is subjected to the data
edits embedded within the input form.
The application continues to collect transactions until either
the operator signals to exit or a system error is detected.
}
PROGRAM Pascal_Sample (output);
CONST
MAXWINDOWLEN = 150;
FILENAMELEN = 86;
TYPE
SMALL_INT = 0..65535
PAC_ 2 = PACKED ARRAY [1..2] OF CHAR;
PAC_ 4 = PACKED ARRAY [1..4] OF CHAR;
PAC_ 8 = PACKED ARRAY [1..8] OF CHAR;
PAC_ 16 = PACKED ARRAY (1..16] OF CHAR;
PAC_ 70 = PACKED ARRAY [1..70] OF CHAR;
PAC_ 80 = PACKED ARRAY [1..80] OF CHAR;
PAC_ 200 = PACKED ARRAY [l..200] OF CHAR;
PAC_ FILENAME = PACKED ARRAY [1..FILENAMELEN] OF CHAR;
PAC_ MAXWINDOWLEN = PACKED ARRAY [1..MAXWINDOWLEN]
OF CHAR;
TWO_BYTE_SUB_RANGE = PACKED ARRAY [ 1. .2] OF 0. .255;
COMAREA REC = RECORD
CSTATUS : SMALL_INT;
LANGUAGE : SMALL_INT;
COMAREALEN : SMALL_INT;
USERBUFLEN : SMALL_INT;
CMODE : SMALL_INT;
LASTKEY : SMALL_INT;
NUMERRS : SMALL_INT;
WINDOWENH : SMALL_INT;
MULTIUSAGE : SMALL_INT;
LABELOPTIONS : SMALL_INT;
CFNAME : PAC_16;