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>COMMITQQRun-time Function: Forces the operating system to execute any pending write operations for thefile associated with a specified unit to the file’s physical device.Module: USE IFCORESyntaxresult = COMMITQQ (unit)unit(Input) INTEGER(4). A <strong>Fortran</strong> logical unit attached to a file to be flushed from cache memory toa physical device.Results:The result type is LOGICAL(4). If an open unit number is supplied, .TRUE. is returned anduncommitted records (if any) are written. If an unopened unit number is supplied, .FALSE. isreturned.Data written to files on physical devices is often initially written into operating-system buffers andthen written to the device when the operating system is ready. Data in the buffer is automaticallyflushed to disk when the file is closed. However, if the program or the computer crashes before thedata is transferred from buffers, the data can be lost. COMMITQQ tells the operating system towrite any cached data intended for a file on a physical device to that device immediately. This iscalled flushing the file.COMMITQQ is most useful when you want to be certain that no loss of data occurs at a criticalpoint in your program; for example, after a long calculation has concluded and you have writtenthe results to a file, or after the user has entered a group of data items, or if you are on a networkwith more than one program sharing the same file. Flushing a file to disk provides the benefits ofclosing and reopening the file without the delay.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBSee Also: the PRINT and WRITE statements in the Language <strong>Reference</strong>ExampleUSE IFCOREINTEGER unit / 10 /INTEGER lenCHARACTER(80) stuffOPEN(unit, FILE='COMMITQQ.TST', ACCESS='Sequential')DO WHILE (.TRUE.)2-38

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

Saved successfully!

Ooh no, something went wrong!