ProvideX V8.20 > Language Reference > 3. System Functions
464
KEF( ) Function
           Return First Key of File
Format
KEF(chan[,fileopt])
Where:
chan
Channel or logical file number of the file to reference.
Supported file options (see also, File Options, p.808):
fileopt
END=stmtref End-of-File transfer
ERR=stmtref Error transfer
KNO=num | name$ File access key number (num) or name (name$)
stmtref
Program line number or label to transfer control to.
Returns
Key of first record in file.
Description
The KEF( ) function returns the key of the first record in the file specified. The result
is based on:
· the current file access key or,
· the access key specified using the KNO= option.
The KEF( ) function can also be used in TCP (Transmission Control Protocol) to
identify local sockets. For more information, see File Handling in the ProvideX User's
Guide.
Example
0010 OPEN (1) "CUSTNO"
......
0100 F$=KEF(1),L$=KEL(1)
0110 PRINT "Customers range from ",F$,"->",L$
......
1010 END