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.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>FSEEKExampleuse IFPORTinteger*4 lunit, i4character*26 stringcharacter*1 char1lunit = 1open (lunit,file = 'fputc.dat')do i = 1,26char1 = char(123-i)i4 = fputc(1,char1) !make valid writesif (i4.ne.0) iflag = 1enddorewind (1)read (1,'(a)') stringprint *, stringPortability Function: Repositions a file specified by a <strong>Fortran</strong> external unit.Module: USE IFPORTSyntaxresult = FSEEK (lunit, offset, from)lunit(Input) INTEGER(4). External unit number of a file.offset(Input) INTEGER(4) or INTEGER(8). Offset in bytes, relative to from, that is to be the newlocation of the file marker.from(Input) INTEGER(4). A position in the file. It must be one of the following:Value Variable Position0 SEEK_SET Positions the file relative to the beginning of the file.1 SEEK_CUR Positions the file relative to the current position.2 SEEK_END Positions the file relative to the end of the file.2-90

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

Saved successfully!

Ooh no, something went wrong!