program exf1 ! exf1.f90 simple output of integer, string, floating point ! ! makes rest of line a comment ! & at end of line makes next line a continuation implicit none integer :: i = 7 ! declare variable i with initial value 7 character :: ac = 'a' ! a single character character (len=13) :: msg = "sample string" real :: x = 37.95 ! 32 bit float double precision :: y = 127.34e10; ! 64 bit double precision print *, "exf1.f90" print *, "i=", i print *, "ac=", ac print *, "msg=", msg print *, "x=", x print *, "y=", y ! or you can specify a format, must have a statement number write(6,90) i 90 format('i=',i6) write(6,92) x 92 format('x=',f12.2) write(6,93) y 93 format('y=',e12.2) end program exf1