next up previous index
Next: Processing an FWEB file Up: Annotating Codes with FWEB Previous: Annotating Codes with FWEB

A simple FWEB example

File tryme.web 

@n9[-n/] % Set FWEB language to Fortran, and recognize short // comments.

\Title{example.web} % \Title is an FWEB TeX macro.
\author{Hermenegilde Kociubinsky} % \author is a LaTeX macro.

This code is intended to illustrate the use of the |write| statement.


program main
  real(kind=4), parameter :: a_constant = 1.2345
  call compute(a_constant)
  stop 0
  subroutine compute(a)
    real(kind=4), intent(in) :: a
    write(*,*) 'a = ', a
  end subroutine compute
end program main

@* \INDEX.

Zdzislaw Meglicki