Fortran – Hello World

email me

Recommended Reading (click for Amazon link)

 

I used the registered version of the Simply Fortran compiler, here: simplyfortran-3.0.msi,  simplyfortran-2.35.msi; also, try the online Fortran compiler.

Code

PROGRAM HelloWorld

! inhibit older feature
IMPLICIT NONE

    ! declare string
    CHARACTER(LEN = 13) :: strLine1
    
    ! set string
    strLine1 = "Hello, World!"
    
    ! display string
    PRINT *, strLine1

    READ(*,*)
    
! end program
END PROGRAM HelloWorld

 

Output

 

Notes

Learn more, Fortran language

Syntax Highlighter