forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

INTERRUPT subroutines

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
yujsg



Joined: 20 Jun 2007
Posts: 15

PostPosted: Thu Aug 09, 2007 5:11 pm    Post subject: INTERRUPT subroutines Reply with quote

if we search "INTERRUPT subroutines" or "set_trap@" in FTN95 user's manual, we can find the following sample code:

EXTERNAL QUITH
INTEGER(KIND=3) :: X
COMPLEX(KIND=2) :: LABEL
COMMON LABEL
CALL LABEL@(LABEL,*1)
CALL SET_TRAP@(QUITH,X,0)
1 READ *,N
DO 2 I=1,N
2 PRINT *,N
PRINT *,'END OF LOOP'
GOTO 1
END

INTERRUPT SUBROUTINE QUITH
COMPLEX(KIND=2) :: LABEL
COMMON LABEL
CALL COU('Quit trapped!')
CALL JUMP@(LABEL)
END

but I tried it in PLATO 3, always got "access violation" run time error at the line of "CALL SET_TRAP@(QUITH,X,0)" please help!
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Sat Aug 11, 2007 4:33 pm    Post subject: Reply with quote

The call to set_trap@ should be...

CALL SET_TRAP@(QUITH,0)

X should not appear in the sample.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group