n********6 发帖数: 58 | 1 Fortran 里有没有类似 C 的 TRY-CATCH ? |
v***v 发帖数: 3 | 2 never heard of that.
【在 n********6 的大作中提到】 : Fortran 里有没有类似 C 的 TRY-CATCH ?
|
sc 发帖数: 122 | 3 maybe in f90 if associated?
【在 n********6 的大作中提到】 : Fortran 里有没有类似 C 的 TRY-CATCH ?
|
O******e 发帖数: 734 | 4 No, that tests whether a pointer points to a valid memory address.
The "associated" statement may return an error status, but it does
not throw an exception.
【在 sc 的大作中提到】 : maybe in f90 if associated?
|
O******e 发帖数: 734 | 5 If you really need to handle general signals using native Fortran,
you will need a compiler that supports the PXFSIG* subroutines
defined in the POSIX Fortran binding standard IEEE 1003.9-1992.
It might be easier to use mixed Fortran/C++ compilation to do
what you want, if your compiler supports mixed language calling.
If you only want to deal with numerical exceptions, check whether
your compiler supports the Fortran 2003 ieee_exceptions intrinsic
module.
【在 n********6 的大作中提到】 : Fortran 里有没有类似 C 的 TRY-CATCH ?
|