Guardian Application Conversion Guide
Converting Basic Elements of a Pascal Program
Converting Pascal Applications
096047 Tandem Computers Incorporated 6–5
Declaring and Using
Programming Variables
For your existing program to run at a high PIN, you might need to add or modify
declarations for the following variables:
CPU and PIN variables
File-system error numbers
Guardian file names, including disk file names, device names,
and process file names
Process identifiers, including process IDs, process handles,
and process descriptors
Declaring CPU and PIN Variables
Your existing program might declare a 16-bit variable for both the CPU and PIN
values:
VAR cpu_pin : INTEGER;
Or your program might declare an 8-bit variable for a PIN value:
VAR pin : BYTE;
Declare all PIN values, including backup-process PIN values, as 16-bit variables.
Declare a CPU value as a separate 16-bit variable:
VAR cpu, pin : INTEGER;
Declaring and Checking File-System Error Numbers
A Guardian procedure can return a file-system error number to report an error or
special condition. You might need to convert the parts of your program that declare
and check file-system errors. For example, your program might declare an 8-bit
variable for a file-system error number:
VAR fs_error_number : BYTE;
Declare a file-system error number as a 16-bit variable:
VAR fs_error_number : INTEGER;
Your program might also include code that sets a maximum value for a file-system
error number (for example, 255). A D-series file-system error number can be a
maximum of 16 bits. Therefore, make sure that your code does not exclude any new
error numbers. Also, because Tandem might define additional error numbers in
future releases, do not consider currently undefined numbers as invalid.
For a list and description of all file-system error numbers, refer to the Guardian
Procedure Errors and Messages Manual.