READS
|
Syntax: |
READS(<Key Number>) <Name of Index
File> ON ERROR … END
|
||||
|
|
|
||||
|
Meaning: |
Reads a record from an Index File by a
secondary key. The data record which is specified by the
current values of the date fields of the secondary key <Key Number> is
read from the Index File. In the case of an error the block ON ERROR ... END
is executed. If there are several data records with the
same secondary key in one Index File, the first found data record is read.
The other data records can be read by the instruction READS-NEXT (<Key Number>). |
||||
|
Parameter: |
|
||||
|
Sample: |
CUSTOMER.NAME$ = "Smith" READS(1) CUSTOMER ON ERROR
ERRORMES = "Customer " + NOBLANK$(1,CUSTOMER.NAME$)
+
" not found. Error " + STR$(OK) + STR$(OK2) +
" " + ERRORTEXT$ END |
||||
|
See also: |
|