Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

PXFFSEEK

POSIX Subroutine: Modifies a file position.

Module

USE IFPOSIX

CALL PXFFSEEK (lunit,ioffset,iwhence,ierror)

lunit

(Input) INTEGER(4). A Fortran logical unit.

ioffset

(Input) INTEGER(4). The number of bytes away from iwhence to place the pointer.

iwhence

(Input) INTEGER(4). The position within the file. The value must be one of the following constants (defined in stdio.h):

SEEK_SET = 0

Offset from the beginning of the file.

SEEK_CUR = 1

Offset from the current position of the file pointer.

SEEK_END = 2

Offset from the end of the file.

ierror

(Output) INTEGER(4). The error status.

If successful, ierror is set to zero; otherwise, an error code. Possible error codes are:

  • EINVAL: No file is connected to lunit, iwhence is not a proper value, or the resulting offset is invalid.

  • ESPIPE: lunit is a pipe or FIFO.

  • EEND: The end of the file has been reached.

The PXFFSEEK subroutine modifies the position of the file connected to unit lunit.