Hey I'm all new to fortran. I've had problems with a bigger code writing data to files. So now I've written the simplest code of all but still cannot write and open a file! I'm have a mac (w/ snow leopard) and I'm using gfortran to compile my code. The code compiles fine but there is no file to be seen. Also, the PRINT command doesn't do anything. Clearly something's off but I can't figure out what.
PROGRAM test
IMPLICIT NONE
INTEGER :: i
OPEN(UNIT=505,FILE="new.txt")
i = 100
PRINT*,i
WRITE(10,'(I7)') i
CLOSE(10)
END PROGRAM
PROGRAM test
IMPLICIT NONE
INTEGER :: i
OPEN(UNIT=505,FILE="new.txt")
i = 100
PRINT*,i
WRITE(10,'(I7)') i
CLOSE(10)
END PROGRAM