FPOS@

Platform

x64, Win32

Purpose

To reposition a file.

Syntax

SUBROUTINE FPOS@(SID,POSITION, NEW_POSITION, ERROR_CODE)
INTEGER (KIND=2) SID, ERROR_CODE
INTEGER (KIND=3) POSITION, NEW_POSITION

Description

FPOS@ attempts to reposition an open file with the given SID to the given POSITION. NEW_POSITION is returned as either the requested POSITION or as the position of end-of-file, whichever is less. ERROR_CODE is returned as zero or with a system error code if it fails.

Notes

If the input value of POSITION is supplied as a constant and the compiler option /INTS is used, it will be necessary to force the length of the constant to 4 bytes.

You can use FPOSLONG@ to reposition a file to a 64-bit offset

SUBROUTINE FPOSLONG@(SID,POSITION, NEW_POSITION, ERROR_CODE)
INTEGER (KIND=2) SID, ERROR_CODE
INTEGER (KIND=4) POSITION, NEW_POSITION

See also

OPENR@, OPENRW@, OPENW@, READF@, READFA@, WRITEF@, WRITEFA@, CLOSEF@, FPOS_EOF@

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited