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.
1127 9123456789
what i has to change..???
Welcome to our forums
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.
1127 9123456789
what i has to change..???
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:
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
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**
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 [u:392689d708]not[/u:392689d708] ticked in properties.