Hello everyone,
I'm trying a foray into fortran (I'm a scientist and a lot of the code I work with is in fortran), so I'm starting from the beginning.
I used the following hello world program:
and compile it in the terminal using gfortran, i.e. 'gfortran hello.f90'. It SHOULD prompt me for the name input and then print the output, but it does neither. No error messages, creates a file called 'a.out', but no read and no print. In the absence of error messages, I have no clue what's going wrong. Any suggestions?
I'm trying a foray into fortran (I'm a scientist and a lot of the code I work with is in fortran), so I'm starting from the beginning.
I used the following hello world program:
! My first Fortran 90 program!
! Greetings!
CHARACTER NAME*20
PRINT*, 'What is your name?'
READ*, NAME
PRINT*, 'Hi there, ', NAME
END
and compile it in the terminal using gfortran, i.e. 'gfortran hello.f90'. It SHOULD prompt me for the name input and then print the output, but it does neither. No error messages, creates a file called 'a.out', but no read and no print. In the absence of error messages, I have no clue what's going wrong. Any suggestions?