| System Functions |
|
| Format | IND(chan[,fileopt]) Where: |
|
| chan | Channel or logical file number of the file to reference. | |
| fileopt | Supported file options (see also, File Options): | |
| ERR=stmtref Error transfer END=stmtref End-Of-File transfer KEY=string$ Record key | ||
| KNO=num | string$ File access key number (num) or name (string$) RNO=num Record number |
||
| stmtref | Program line number or statement label to which to transfer control. | |
| Returns | Record index (next or specified record). | |
| Description | The IND( ) function returns the record index of either the next record in the file specified or, on a Direct or Keyed file using the KEY= option, the record index for the record identified by the key. For Direct/ Keyed or Sort files without the KEY= option, the value returned is the record index for the record with the next higher key value. For variable length Direct/Keyed files, the value returned is an internal pointer to the record. For more information, see File Handling in the ProvideX User's Guide. |
|
| Example | 0010 OPEN (13) "CUSTNO" 0020 LET I=IND(13,END=1000) 0030 READ (13,IND=I) R$ 0040 PRINT "Rec#: ",I," Data: ", R$ 0050 GOTO 0020 1000 PRINT "End-of-file" 1010 END |
|