LOC¶
Syntax¶
Versions: Disk
Description¶
With random disk files, LOC returns the next record number to be used if a GET or PUT (without a record number) is executed. With sequential files, LOC returns the number of sectors (128 byte blocks) read from or written to the file since it was OPENed.
Example¶
See Also¶
- CLOSE - To conclude I/O to a disk file
- EOF - Returns -1 (true) if the end of a sequential file has been reached
- FIELD - To allocate space for variables in a random file buffer
- FILES - Displays the directory of files on disk
- GET - To read a record from a random disk file into a random buffer
- INPUT$ - Returns a string of X characters, read from the terminal or from file number Y
- LOF - Returns the total file size in bytes (LOC returns current position/record number)
- LPOS - Returns the current position of the line printer print head within the line printer buffer
- LSET - Left-justifies a string in a field for random file output
- OPEN - To allow I/O to a disk file
- POS - Returns the current cursor position
- PRINTi AND PRINTi USING - To write data to a sequential disk file
- PUT - To write a record from a random buffer to a random file
- RESET - Closes all open files
- RSET - Right-justifies a string in a field for random file output
- WRITE # - Write data to a sequential file with delimiters
- LINE INPUT# - To read an entire line (up to 254 characters), without delimiters, from a sequential disk data file to a string variable