replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - I/O error
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 

I/O error

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



Joined: 22 Dec 2010
Posts: 28

PostPosted: Fri Jan 14, 2011 11:55 am    Post subject: I/O error Reply with quote

I am using FTN95 to build a dll and calling from a VB .NET dll.

Whenever there is an error inside FORTRAN code, and the next time FORTRAN function is called, it shows up an error like:

a function called from within an i/o statement has itself performed i/o

The error occurs when the first internal read function is encountered.

The first error inside FORTRAN code is caught by a .NET try..catch block.

Thanks
Abhishek
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Jan 14, 2011 4:31 pm    Post subject: Reply with quote

This may be a spurious error message but when the error message is correct it means that the I/O is being called recursively. In other words your I/O list contains a function/subroutine call that in turn uses I/O. You cannot do this with FTN95.
Back to top
View user's profile Send private message AIM Address
Abhishek



Joined: 22 Dec 2010
Posts: 28

PostPosted: Fri Jan 14, 2011 5:05 pm    Post subject: Reply with quote

the error is caused at following statement:

READ(INPIN(RPTR:),10) IDEN

INPIN is CHAR(3000)
RPTR is integer = 1
IDEN is CHAR(80)
10 is a label FORMAT(80A1)

The content of INPIN remains same.
Sometimes this error message is caused and sometimes not.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Jan 15, 2011 9:44 am    Post subject: Reply with quote

INPIN(RPTR:) is a substring of a character variable with many characters
but INPIN looks like an array of characters of length one.
Back to top
View user's profile Send private message AIM Address
Abhishek



Joined: 22 Dec 2010
Posts: 28

PostPosted: Sat Jan 15, 2011 2:28 pm    Post subject: Reply with quote

I am using INPIN as follows:

SUBROUTINE INPC(INPIN)

CHARACTER(*) INPIN


When calling INPC from VB, a string variable is passed.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Jan 15, 2011 5:04 pm    Post subject: Reply with quote

If you can post a complete small working program showing this error then I will take a look at it.
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