Hi, I've write a simple program in fortran as follow:
program file1
implicit none
! Prompt user for a filename and read it:
CHARACTER*64 filename
character*64 reading
WRITE (*, '(A)') ' enter file to create: '
READ (*, '(A)') filename
! Open the file for formatted sequential access as unit 7.
! Note that the specified access need not have been specified,
! since it is the default (as is "formatted").
OPEN (7, FILE = filename, ACCESS = 'SEQUENTIAL', STATUS = 'NEW')
write(7,*)'Nuovo file'
open(10,file='pippo', access='sequential', status='old')
read(10,*)reading
close(7)
close(10)
write(*,*) reading
print *, 'Hello World'
end program file1
When I run it under Code::Blocks (ver. 17.12, the latest) ide o in command prompt I get an error message as in the image attached. Code::Blocks is installed in a OS windows 10 (
) 64bit.
If I compile and run the same code with "my old computer" (a virtual machine over the same computer), with xp and visual studio intel fortran , all is good!
Can someone help me and show were I fall?
Thanks