HP RPG/XL Programmer's Guide (30318-90001)

5- 2
Compile-Time Tables and Arrays. Compile-time table and array values are
loaded during program compilation. These values can be kept as part of
the source program or they can be saved in separate files on disc. Once
compiled, compile-time tables and arrays become a part of the object
program. To permanently change elements in them, you must recompile the
program.
Figure 5-1 shows what compile-time array values look like when saved in a
disc file. The name of this particular disc file is FLBL1. It contains
the function key labels for the program shown in Figure 5-2.
_____________________________________
| |
| ADD MODE |
| CHANGE MODE |
| INQUIRY MODE |
| |
| DELETE MODE |
| |
| |
| EXIT |
| |
_____________________________________
Figure 5-1. Compile-Time Array Entries on Disc
Figure 5-2 shows segments of a program that uses two compile-time arrays,
LBL and MSG (the program from which the segments are taken is listed in
Figure 4-23). LBL is an array that contains function key labels. The
labels come from the file, FLBL1, shown in Figure 5-1. The MSG array
contains messages that are displayed on the terminal during program
execution. The actual messages for the MSG array follow the Output
Specifications in Figure 5-2.