- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I hope my english is good.. I need to catch an overlow but do not exit by my program.. The code is the following:
Program Fattoriale
USE MSFLIB
INTERFACE
FUNCTION hand_fpe (sigid, except)
INTEGER(4) hand_fpe
INTEGER(2) sigid, except
END FUNCTION
END INTERFACE
integer(4) iret
iret = SIGNALQQ(SIG$FPE, hand_fpe)
call singolaPrecisione
End
! Exception handler routine hand_fpe
FUNCTION hand_fpe (signum, excnum)
USE MSFLIB
INTEGER(2) signum, excnum
SELECT CASE(excnum)
CASE( FPE$OVERFLOW )
call doppiaPrecisione
!stop ' Fattoriale calcolato'
END SELECT
!hand_fpe = 1
END
Effectively i catch the overlow but on the screen appear "press any key to continue", then the program terminate... but i need to execute the code written in subroutine "doppiaPrecisione". How can i do?
Thanx for any help
Program Fattoriale
USE MSFLIB
INTERFACE
FUNCTION hand_fpe (sigid, except)
INTEGER(4) hand_fpe
INTEGER(2) sigid, except
END FUNCTION
END INTERFACE
integer(4) iret
iret = SIGNALQQ(SIG$FPE, hand_fpe)
call singolaPrecisione
End
! Exception handler routine hand_fpe
FUNCTION hand_fpe (signum, excnum)
USE MSFLIB
INTEGER(2) signum, excnum
SELECT CASE(excnum)
CASE( FPE$OVERFLOW )
call doppiaPrecisione
!stop ' Fattoriale calcolato'
END SELECT
!hand_fpe = 1
END
Effectively i catch the overlow but on the screen appear "press any key to continue", then the program terminate... but i need to execute the code written in subroutine "doppiaPrecisione". How can i do?
Thanx for any help
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page