 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
mmaharish
Joined: 31 Jan 2012 Posts: 29 Location: Chennai,India
|
Posted: Thu Feb 16, 2012 12:33 pm Post subject: ERROR FILE ALREADY IN USE plz help me...very urgent |
|
|
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.
what i has to change..??? |
|
Back to top |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Fri Feb 17, 2012 9:35 am Post subject: |
|
|
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 |
|
 |
mmaharish
Joined: 31 Jan 2012 Posts: 29 Location: Chennai,India
|
Posted: Fri Feb 17, 2012 11:22 am Post subject: |
|
|
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 |
|
 |
davidb
Joined: 17 Jul 2009 Posts: 560 Location: UK
|
Posted: Fri Feb 17, 2012 12:13 pm Post subject: |
|
|
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 |
|
 |
|
|
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
|