FPOSITC
The FPOSITC instruction retrieves the position following the last byte accessed. This is the same as FPOSIT in Sunbelt mode. It uses one of the following formats:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
file
Required. A previously defined and opened FILE, IFILE, or AFILE definition whose position of the last byte accessed is returned.
sector
Required. A previously defined Numeric Variable in which the sector number of the last byte accessed is returned.
tab
Required. A previously defined Numeric Variable in which the byte position within the sector of the last byte accessed is returned.
offset
Required. A previously defined Numeric Variable in which the byte offset of the last byte accessed from the beginning of the file is returned.
Flags Affected: OVER, ZERO
Note the following:
Format one (1) returns the current sector number and tab position within the sector compatible with Datapoint's DOS method. The sector number is based upon the defined sector size for the file when it was last opened.
Format two (2) returns the current byte position of the current record in {offset}. The result of this format is compatible with the REPOSIT instruction.
The current file position remains unchanged.
If the file position is zero, the ZERO condition flag is set.
If any variable is not large enough to hold the appropriate position, the result is indeterminate and the OVER condition flag is set.
See Also: Example Code, FPOSIT, FPOSITB, REPOSIT, Disk I/O Instructions
![]() |