PT Program Generator User's Manual

Example Frames
156 PT Program Generator (PPG) v5.0
Figure 127. The Output: INDEXED Dialog
The loop continues until the “end” record is reached, at which point the pro-
gram deletes the “end” record and exits the frame.
The file is displayed one record at a time on the screen. Each time the user
presses a key, the next record is displayed on the last line, and the previous line
moves up. The user can scroll the screen up to see previous entries in the file.
A variation of this example gives the user the ability to search through records
in both directions: First, find the end of the file (refer to
Finding the Number of
Records in a File on page 147). Next, output the first record and give the option to
see the next or the previous record. Then, increment or decrement the counter
and verify that the range is between 1 and the end-of-the-file value.
Math: INDEX+1 Increments the value in the INDEX register by 1 so that the next record
in the file is displayed.
Input: NEXT Keeps the record contents displayed until the user presses a key. The
program then loops back to
Verify: END so that the next record can be
displayed.
2342.book Page 156 Thursday, July 22, 2004 8:35 AM