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 2ExamplePROGRAM SETREENTUSE IFCOREINTEGER*4 MODECHARACTER*10 REENT_TXT(3) /'NONE','ASYNCH ','THREADED'/PRINT*,'Setting Reentrancy mode to ',REENT_TXT(MODE+1)MODE = FOR_SET_REENTRANCY(FOR_K_REENTRANCY_NONE)PRINT*,'Previous Reentrancy mode was ',REENT_TXT(MODE+1)MODE = FOR_SET_REENTRANCY(FOR_K_REENTRANCY_INFO)PRINT*,'Current Reentrancy mode is ',REENT_TXT(MODE+1)ENDFPUTCPortability Function: Writes a character to the file specified by a <strong>Fortran</strong> external unit,bypassing normal <strong>Fortran</strong> input/output.Module: USE IFPORTSyntaxresult = FPUTC (lunit, char)lunit(Input) INTEGER(4). Unit number of a file.char(Output) Character*(*). Variable whose value is to be written to the file corresponding to lunit.Results:The result type is INTEGER(4). The result is zero if the write was successful; otherwise, an errorcode, such as:EINVAL - The specified unit is invalid (either not already open, or an invalid unit number)If you use WRITE, READ, or any other <strong>Fortran</strong> I/O statements with lunit, be sure to read "Inputand Output With Portability Routines" in your user’s guide.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBSee Also: "I/O Formatting" in the Language <strong>Reference</strong>, "Files, Devices, and Input/OutputHardware" in your user’s guide2-89

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

Saved successfully!

Ooh no, something went wrong!