replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - ERROR FILE ALREADY IN USE plz help me...very urgent
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 

ERROR FILE ALREADY IN USE plz help me...very urgent

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



Joined: 31 Jan 2012
Posts: 29
Location: Chennai,India

PostPosted: Thu Feb 16, 2012 12:33 pm    Post subject: ERROR FILE ALREADY IN USE plz help me...very urgent Reply with quote

Quote:

write(*,104) 'R','run.number'
104 format(a1,'-',a10)
print*,'I m entering'
open(unit=1,file='run.number',status='old')

rewind(unit=1)



Bold line shows FILE ALREADY EXIST.

run.number contains.
Quote:
1127 9
123456789


what i has to change..???
Back to top
View user's profile Send private message Yahoo Messenger
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Fri Feb 17, 2012 9:35 am    Post subject: Reply with quote

I typed your code in and it works for me. I don't get any FILE ALREADY EXISTS error.

I added some lines to read the values in the file.

Here is the code:

Code:

write(*,104) 'R','run.number'
104 format(a1,'-',a10)
print *,'I m entering'
open(unit=1,file='run.number',status='old')
rewind(1)
read(1,*) i, j
read(1,*) k
print *, i, j
print *, k
end

_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
mmaharish



Joined: 31 Jan 2012
Posts: 29
Location: Chennai,India

PostPosted: Fri Feb 17, 2012 11:22 am    Post subject: Reply with quote

it says
i must appear in a type declaration because IMPLICIT NONE has been used
j must appear in a type declaration because IMPLICIT NONE has been used
k must appear in a type declaration because IMPLICIT NONE has been used
Back to top
View user's profile Send private message Yahoo Messenger
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Fri Feb 17, 2012 12:13 pm    Post subject: Reply with quote

I dont have IMPLICIT NONE in my code.

However, you may have this setup in properties. I assume you are using Plato. Make sure that "Declare Variables" and "Set Gobal IMPLICIT NONE" are not ticked in properties.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General 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