Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference Intel® Fortran Libraries Reference

h.eng.cam.ac.uk
from h.eng.cam.ac.uk More from this publisher
12.07.2015 Views

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

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

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

Saved successfully!

Ooh no, something went wrong!