12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>ExampleUSE IFPORTinteger(4) statarray(12), istatOPEN (unit=1,file='datfile.dat')ISTAT = FSTAT (1, statarray)if (.NOT. istat) thenprint *, statarrayend ifFTELL, FTELLI8Portability Functions: Return the current position of a file.Module: USE IFPORTSyntaxresult = FTELL (lunit)result = FTELLI8 (lunit)lunit(Input) INTEGER(4). External unit number of a file.Results:The result type is INTEGER(4) for FTELL; INTEGER(8) for FTELLI8. The result is the offset,in bytes, from the beginning of the file. A negative value indicates an error, which is the negationof the IERRNO error code. The following is an example of an error code:EINVAL: lunit is not a valid unit number, or is not open.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBFULLPATHQQPortability Function: Returns the full path for a specified file or directory.Module: USE IFPORTSyntaxresult = FULLPATHQQ (name, pathbuf)2-94

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

Saved successfully!

Ooh no, something went wrong!