Handling Floating-Point Exceptions in FORTRAN (57918)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 3.3
- Microsoft FORTRAN Compiler for MS-DOS 3.31
- Microsoft FORTRAN Compiler for MS-DOS 4.0
- Microsoft FORTRAN Compiler for MS-DOS 4.01
- Microsoft FORTRAN Compiler for MS-DOS 4.1
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 4.1
- Microsoft FORTRAN compiler for OS/2 5.0
- Microsoft FORTRAN compiler for OS/2 5.1
- Microsoft FORTRAN PowerStation for MS-DOS 1.0
- Microsoft FORTRAN PowerStation for MS-DOS 1.0a
- Microsoft Fortran Powerstation 32 for Windows NT 1.0
- Microsoft Fortran Powerstation 32 for Windows NT 4.0
This article was previously published under Q57918 SUMMARY
The IEEE floating point standard defines the following five exceptions:
invalid operation, divide by zero, overflow, underflow, and precision. The
Microsoft FORTRAN run-time libraries provide the following three routines
to obtain and modify the value of the status and control words:
- The store-status-word (SSWRQQ) function returns the value of the
status word.
- The store-control-word (SCWRQQ) function returns the value of the
control word.
- The load-control-word (LCWRQQ) function sets the control word to a
specified value.
An application can specify the manner to handle an exception by changing
the control word and can determine which exceptions have occurred by
checking the value of the status word.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbLangFortran KB57918 |
---|
|