Fortran

I am still trying to figure out how to create a Fortran style sheet in WordPress.

program precision
  use iso_fortran_env
  implicit none
  
  real(kind=REAL64) :: d ! this is a comment
  real(kind=REAL32) :: s

  d = 1.3_REAL64
  s = 1.2

  call foo( d, 1.2_REAL64 )
contains
  subroutine foo( a, b )
    real(kind=REAL64), optional :: a
    real(kind=REAL64) :: b

    b = a

  end subroutine foo
end program precision
Advertisements