Intel® Fortran Compiler 17.0 Developer Guide and Reference

INQUIRE: SIZE Specifier

The SIZE specifier asks the size of a file in file storage units. It takes the following form:

SIZE = sz

sz

Is a scalar integer variable.

The sz variable is assigned the size of the file in file storage units. If the file size cannot be determined, the variable is assigned the value -1.

For a file that is connected for stream access, the file size is the number of the highest-numbered file storage unit in the file.

For a file that is connected for sequential or direct access, the file size may be different from the number of storage units implied by the data in the records; the exact relationship is processor-dependent.