12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Descriptions of the Library Routines 2FSTATResults:The result type is INTEGER(4). The result is zero if the repositioning was successful; otherwise,an error code, such as:EINVAL: The specified unit is invalid (either not already open, or an invalid unit number), orthe from parameter is invalid.The file specified in lunit must be open.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBExampleUSE IFPORTinteger(4) istat, offset, iposcharacter icharOPEN (unit=1,file='datfile.dat')offset = 5ipos = 0istat=fseek(1,offset,ipos)if (.NOT. stat) thenistat=fgetc(1,ichar)print *, 'data is ',icharend ifPortability Function: Returns detailed information about a file specified by a external unitnumber.Module: USE IFPORTSyntaxresult = FSTAT (lunit, statb)lunit(Input) INTEGER(4). External unit number of the file to examine.statb(Output) INTEGER(4) or INTEGER(8). One-dimensional array of size 12; where the systeminformation is stored. The elements of statb contain the following values:2-91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!