Intel® Fortran Libraries Reference
Intel® Fortran Libraries Reference Intel® Fortran Libraries Reference
2 Intel Fortran Libraries ReferenceFOR_GET_FPERun-time Function: Returns the current settings of floating-point exception flags. This routinecan be called from a C or Fortran program.Module: USE IFCORESyntaxresult = FOR_GET_FPE ( )Results:The result type is INTEGER(4). The return value represents the settings of the currentfloating-point exception flags. The meanings of the bits are defined in the IFQWIN module file.To set floating-point exception flags after program initialization, use “FOR_SET_FPE”.ExampleUSE IFCOREINTEGER*4 FPE_FLAGSFPE_FLAGS = FOR_GET_FPE ( )for_rtl_finish_Run-Time Function: Cleans up the Fortran run-time environment; for example, flushing buffersand closing files. It also issues messages about floating-point exceptions, if any occur.This routine should be called from a C main program; it is invoked by default from a Fortran mainprogram.Syntaxresult = for_rtl_finish_ ( )Results:The result is an I/O status value. For information on these status values, see "Using the IOSTATValue and Fortran Exit Codes" in your user’s guide.To initialize the Fortran run-time environment, use “for_rtl_init_”.ExampleConsider the following C code:int io_status;int for_rtl_finish_ ( );io_status = for_rtl_finish_ ( );2-86
Descriptions of the Library Routines 2for_rtl_init_Run-Time Subroutine: Initializes the Fortran run-time environment. It establishes handlers andfloating-point exception handling, so Fortran subroutines behave the same as when called from aFortran main program.This routine should be called from a C main program; it is invoked by default from a Fortran mainprogram.SyntaxCALL for_rtl_init_ (argcount, actarg)argcountIs a command-line parameter describing the argument count.actargIs a command-line parameter describing the actual arguments.To clean up the Fortran run-time environment, use “for_rtl_finish_”.ExampleConsider the following C code:int argc;char **argv;void for_rtl_init_ (int *, char **);for_rtl_init_ (&argc, argv);FOR_SET_FPERun-time Function: Sets the floating-point exception flags. This routine can be called from a Cor Fortran program.Module: USE IFCORESyntaxresult = FOR_SET_FPE (a)aMust be of type INTEGER(4). It contains bit flags controlling floating-point exception trapping,reporting, and result handling.Results:The result type is INTEGER(4). The return value represents the previous settings of thefloating-point exception flags. The meanings of the bits are defined in the IFCORE module file.2-87
- Page 88 and 89: 2 Intel Fortran Libraries Reference
- Page 90 and 91: 2 Intel Fortran Libraries Reference
- Page 92 and 93: 2 Intel Fortran Libraries Reference
- Page 94 and 95: 2 Intel Fortran Libraries Reference
- Page 96: 2 Intel Fortran Libraries Reference
- Page 100 and 101: 2 Intel Fortran Libraries Reference
- Page 102 and 103: 2 Intel Fortran Libraries Reference
- Page 104 and 105: 2 Intel Fortran Libraries Reference
- Page 106 and 107: 2 Intel Fortran Libraries Reference
- Page 108 and 109: 2 Intel Fortran Libraries Reference
- Page 110 and 111: 2 Intel Fortran Libraries Reference
- Page 112 and 113: 2 Intel Fortran Libraries Reference
- Page 114 and 115: 2 Intel Fortran Libraries Reference
- Page 116 and 117: 2 Intel Fortran Libraries Reference
- Page 118 and 119: 2 Intel Fortran Libraries Reference
- Page 120 and 121: 2 Intel Fortran Libraries Reference
- Page 122 and 123: 2 Intel Fortran Libraries Reference
- Page 124 and 125: 2 Intel Fortran Libraries Reference
- Page 126 and 127: 2 Intel Fortran Libraries Reference
- Page 128 and 129: 2 Intel Fortran Libraries Reference
- Page 130 and 131: 2 Intel Fortran Libraries Reference
- Page 132 and 133: 2 Intel Fortran Libraries Reference
- Page 134 and 135: 2 Intel Fortran Libraries Reference
- Page 136 and 137: 2 Intel Fortran Libraries Reference
- Page 140 and 141: 2 Intel Fortran Libraries Reference
- Page 142 and 143: 2 Intel Fortran Libraries Reference
- Page 144 and 145: 2 Intel Fortran Libraries Reference
- Page 146 and 147: 2 Intel Fortran Libraries Reference
- Page 148 and 149: 2 Intel Fortran Libraries Reference
- Page 150 and 151: 2 Intel Fortran Libraries Reference
- Page 152 and 153: 2 Intel Fortran Libraries Reference
- Page 154 and 155: 2 Intel Fortran Libraries Reference
- Page 156 and 157: 2 Intel Fortran Libraries Reference
- Page 158 and 159: 2 Intel Fortran Libraries Reference
- Page 160 and 161: 2 Intel Fortran Libraries Reference
- Page 162 and 163: 2 Intel Fortran Libraries Reference
- Page 164 and 165: 2 Intel Fortran Libraries Reference
- Page 166 and 167: 2 Intel Fortran Libraries Reference
- Page 168 and 169: 2 Intel Fortran Libraries Reference
- Page 170 and 171: 2 Intel Fortran Libraries Reference
- Page 172 and 173: 2 Intel Fortran Libraries Reference
- Page 174 and 175: 2 Intel Fortran Libraries Reference
- Page 176 and 177: 2 Intel Fortran Libraries Reference
- Page 178 and 179: 2 Intel Fortran Libraries Reference
- Page 180 and 181: 2 Intel Fortran Libraries Reference
- Page 182 and 183: 2 Intel Fortran Libraries Reference
- Page 184 and 185: 2 Intel Fortran Libraries Reference
- Page 186 and 187: 2 Intel Fortran Libraries Reference
Descriptions of the Library Routines 2for_rtl_init_Run-Time Subroutine: Initializes the <strong>Fortran</strong> run-time environment. It establishes handlers andfloating-point exception handling, so <strong>Fortran</strong> subroutines behave the same as when called from a<strong>Fortran</strong> main program.This routine should be called from a C main program; it is invoked by default from a <strong>Fortran</strong> mainprogram.SyntaxCALL for_rtl_init_ (argcount, actarg)argcountIs a command-line parameter describing the argument count.actargIs a command-line parameter describing the actual arguments.To clean up the <strong>Fortran</strong> run-time environment, use “for_rtl_finish_”.ExampleConsider the following C code:int argc;char **argv;void for_rtl_init_ (int *, char **);for_rtl_init_ (&argc, argv);FOR_SET_FPERun-time Function: Sets the floating-point exception flags. This routine can be called from a Cor <strong>Fortran</strong> program.Module: USE IFCORESyntaxresult = FOR_SET_FPE (a)aMust be of type INTEGER(4). It contains bit flags controlling floating-point exception trapping,reporting, and result handling.Results:The result type is INTEGER(4). The return value represents the previous settings of thefloating-point exception flags. The meanings of the bits are defined in the IFCORE module file.2-87