Finding the Number of Records in a File
User’s Guide
147
Finding the Number of Records in a File
The easiest way to determine the number of records in a file is to use a
Verify
node with
Match
set to a value you know is not in the file and the
Store Index
in
Register
checkbox selected (with a register specified for storing the index
value). Since it won’t find a match, the program will return the file size, storing
it in the index register.
Another method copies a known value to the end of the file, uses a
Verify
node
to locate it, and then subtracts
1
from the
Location Index
.
Tip07.scr
,
illustrated in
, demonstrates this method.
Figure 120. Tip07.scr Determines the Number of Records in a File
Display:
RECORDS
Writes
RECORDS=
on the portable’s screen.
2342.book Page 147 Thursday, July 22, 2004 8:35 AM
Содержание PT Program Generator
Страница 1: ...PT Program Generator User s Manual 2342 book Page 0 Thursday July 22 2004 8 35 AM...
Страница 16: ...Introduction 4 PT Program Generator PPG v5 0 NOTES 2342 book Page 4 Thursday July 22 2004 8 35 AM...
Страница 34: ...PPG Application Design 22 PT Program Generator PPG v5 0 NOTES 2342 book Page 22 Thursday July 22 2004 8 35 AM...
Страница 60: ...The PPG Menubar 48 PT Program Generator PPG v5 0 NOTES 2342 book Page 48 Thursday July 22 2004 8 35 AM...
Страница 88: ...Creating Using Nodes 76 PT Program Generator PPG v5 0 NOTES 2342 book Page 76 Thursday July 22 2004 8 35 AM...
Страница 174: ...The PPG Library 162 PT Program Generator PPG v5 0 NOTES 2342 book Page 162 Thursday July 22 2004 8 35 AM...
Страница 180: ...ASCII Hex Conversion Table 168 PT Program Generator PPG v5 0 NOTES 2342 book Page 168 Thursday July 22 2004 8 35 AM...
Страница 194: ...Glossary 182 PT Program Generator PPG v5 0 NOTES 2342 book Page 182 Thursday July 22 2004 8 35 AM...
Страница 203: ...2342 book Page 191 Thursday July 22 2004 8 35 AM...