?? mfm_error.f
字號:
!===============================================================================! MFM_Error Class!===============================================================================!! Simple error handling routines for setting the type of handler, and! retrieving error messages.!! Public Member Functions:! ------------------------! MFM_ErrHandlerSetType ! MFM_GetErrString! MFM_ErrorTest!!===============================================================================!BOP!! !IROUTINE: MFM_ErrHandlerSetType!! !INTERFACE: subroutine MFM_ErrHandlerSetType(type) ! !PARAMETERS: integer, intent(in) :: type ! Type of error handling desired ! !DESCRIPTION:! Sets the type of error handling to either {\tt MFM\_ERR\_RETURN} or! {\tt MFM\_ERR\_EXIT}. The type of error handling is independent of ! whether the optional return code is included in a the argument list ! of a procedure call.!!EOP!------------------------------------------------------------------------------- call MF_ErrHandlerSetType(type) end subroutine MFM_ErrHandlerSetType!===============================================================================!BOP!! !IROUTINE: MFM_ErrPrint!! !INTERFACE: subroutine MFM_ErrPrint(rc) ! !PARAMETERS: integer, intent(in) :: rc ! Return code to be translated ! !DESCRIPTION:! Prints an error message corresponding to an integer return code.!!EOP!------------------------------------------------------------------------------- call MF_ErrPrint(rc) end subroutine MFM_ErrPrint!===============================================================================!BOP!! !IROUTINE: MFM_ErrorTest!! !INTERFACE: subroutine MFM_ErrorTest(test, str) ! !PARAMETERS: logical, intent(in) :: test ! evaluated expression character(60), intent(in) :: str ! string description of test! !DESCRIPTION:! Prints a {\tt PASS TEST} message to stdout if {\tt test} is {\tt .TRUE.}, ! and a {\tt FAIL TEST} message if {\tt test} is false. !!EOP!------------------------------------------------------------------------------- if(test) then print *, "PASS TEST: ", str else print *, "FAIL TEST: ", str end if end subroutine MFM_ErrorTest!===============================================================================
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -