Intel® Fortran Libraries Reference
Intel® Fortran Libraries Reference Intel® Fortran Libraries Reference
2 Intel Fortran Libraries ReferenceThe defaults for the floating-point control word are 53-bit precision, round to nearest, and thedenormal, underflow and inexact precision exceptions disabled. An exception is disabled if its flagis set to 1 and enabled if its flag is cleared to 0. Exceptions can be disabled by setting the flags to 1with SETCONTROLFPQQ.If an exception is disabled, it does not cause an interrupt when it occurs. Instead, floating-pointprocesses generate an appropriate special value (NaN or signed infinity), but the programcontinues.You can find out which exceptions (if any) occurred by calling GETSTATUSFPQQ. If errors onfloating-point exceptions are enabled (by clearing the flags to 0 with SETCONTROLFPQQ), theoperating system generates an interrupt when the exception occurs. By default, these interruptscause run-time errors, but you can capture the interrupts with SIGNALQQ and branch to your ownerror-handling routines.You can use GETCONTROLFPQQ to retrieve the current control word andSETCONTROLFPQQ to change the control word. Most users do not need to change the defaultsettings. For a full discussion of the floating-point control word, exceptions, and error handling,see "The Floating-Point Environment" in your user’s guide.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBSee Also: “SETCONTROLFPQQ”, “GETSTATUSFPQQ”, “SIGNALQQ”,“CLEARSTATUSFPQQ”ExampleUSE IFPORTINTEGER(2) controlCALL GETCONTROLFPQQ (control)!if not rounding downIF (IAND(control, FPCW$DOWN) .NE. FPCW$DOWN) THENcontrol = IAND(control, NOT(FPCW$MCW_RC)) ! clear all! roundingcontrol = IOR(control, FPCW$DOWN)! set to! round downCALL SETCONTROLFPQQ(control)END IFEND2-108
Descriptions of the Library Routines 2GETCURRENTPOSITION, GETCURRENTPOSITION_WGraphics Subroutines: Return the coordinates of the current graphics position. Thesesubroutines are only available on Windows* systems.Module: USE IFQWINSyntaxCALL GETCURRENTPOSITION (t)CALL GETCURRENTPOSITION_W (wt)t(Output) Derived type xycoord. Viewport coordinates of current graphics position. The derivedtype xycoord is defined in IFQWIN.F90 as follows:TYPE xycoordINTEGER(2) xcoord ! x-coordinateINTEGER(2) ycoord ! y-coordinateEND TYPE xycoordwt(Output) Derived type wxycoord. Window coordinates of current graphics position. Thederived type wxycoord is defined in IFQWIN.F90 as follows:TYPE wxycoordREAL(8) wx ! x-coordinateREAL(8) wy ! y-coordinateEND TYPE wxycoordLINETO, MOVETO, and OUTGTEXT all change the current graphics position. It is in the centerof the screen when a window is created.Graphics output starts at the current graphics position returned by GETCURRENTPOSITION orGETCURRENTPOSITION_W. This position is not related to normal text output (fromOUTTEXT or WRITE, for example), which begins at the current text position (seeSETTEXTPOSITION). It does, however, affect graphics text output from OUTGTEXT.CompatibilitySTANDARD GRAPHICS QUICKWIN GRAPHICS LIBSee Also: “LINETO, LINETO_W”, “MOVETO, MOVETO_W”, “OUTGTEXT”,“SETTEXTPOSITION”, “GETTEXTPOSITION”Example! Program to demonstrate GETCURRENTPOSITIONUSE IFQWIN2-109
- 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 138 and 139: 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 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
- Page 188 and 189: 2 Intel Fortran Libraries Reference
- Page 190 and 191: 2 Intel Fortran Libraries Reference
- Page 192 and 193: 2 Intel Fortran Libraries Reference
- Page 194 and 195: 2 Intel Fortran Libraries Reference
- Page 196 and 197: 2 Intel Fortran Libraries Reference
- Page 198 and 199: 2 Intel Fortran Libraries Reference
- Page 200 and 201: 2 Intel Fortran Libraries Reference
- Page 202 and 203: 2 Intel Fortran Libraries Reference
- Page 204 and 205: 2 Intel Fortran Libraries Reference
- Page 206 and 207: 2 Intel Fortran Libraries Reference
- Page 208 and 209: 2 Intel Fortran Libraries Reference
2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>The defaults for the floating-point control word are 53-bit precision, round to nearest, and thedenormal, underflow and inexact precision exceptions disabled. An exception is disabled if its flagis set to 1 and enabled if its flag is cleared to 0. Exceptions can be disabled by setting the flags to 1with SETCONTROLFPQQ.If an exception is disabled, it does not cause an interrupt when it occurs. Instead, floating-pointprocesses generate an appropriate special value (NaN or signed infinity), but the programcontinues.You can find out which exceptions (if any) occurred by calling GETSTATUSFPQQ. If errors onfloating-point exceptions are enabled (by clearing the flags to 0 with SETCONTROLFPQQ), theoperating system generates an interrupt when the exception occurs. By default, these interruptscause run-time errors, but you can capture the interrupts with SIGNALQQ and branch to your ownerror-handling routines.You can use GETCONTROLFPQQ to retrieve the current control word andSETCONTROLFPQQ to change the control word. Most users do not need to change the defaultsettings. For a full discussion of the floating-point control word, exceptions, and error handling,see "The Floating-Point Environment" in your user’s guide.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBSee Also: “SETCONTROLFPQQ”, “GETSTATUSFPQQ”, “SIGNALQQ”,“CLEARSTATUSFPQQ”ExampleUSE IFPORTINTEGER(2) controlCALL GETCONTROLFPQQ (control)!if not rounding downIF (IAND(control, FPCW$DOWN) .NE. FPCW$DOWN) THENcontrol = IAND(control, NOT(FPCW$MCW_RC)) ! clear all! roundingcontrol = IOR(control, FPCW$DOWN)! set to! round downCALL SETCONTROLFPQQ(control)END IFEND2-108