| System Functions |
|
| Format | KEC(chan[,fileopt]) Where: |
|
| chan | Channel or logical file number of your given file. | |
| fileopt | Supported file options (see also, File Options): | |
| ERR=stmtref Error transfer. KNO=num | string$ File access key number (num) or name (string$). |
||
| stmtref | Program line number or statement label to which to transfer control. | |
| Returns | Current key or current logical position in file | |
| Description | The KEC( ) function returns the current record's key. The result is based on: • the current file access key or, • the access key specified using the KNO= option. Typically, the KEC( ) function is used after you read a record, to determine the key of the record you just read (i.e., the key of the current record or current position in the file). For more information, see File Handling in the ProvideX User's Guide. |
|
| Example | 0010 OPEN (13) "CUSTNO" 0020 READ (13,KNO=0) R$ 0030 LET K$=KEC(13), K1$=KEC(13,KNO=1) 0040 PRINT "Key: ",K$," Alt: ", K1$, " Data: ", R$ 0050 GOTO 0020 1000 PRINT "End-of-file" 1010 END |
|