# System Functions

IND( ) | Return Next Record Index

## Format

IND(chan[,fileopt])
Where:

chan | Channel or logical file number of the file to reference.
fileopt | Supported file options (see 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.

## See Also

File Handling

## 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