@z --- demo1.web ---

This file is part of FWEB.  It and its woven output demo1.tex is included
into the user manual fwebman.tex. 

Author:  J. A. Krommes
Version: 1.23
Date:    April 1, 1992

@x-----------------------------------------------------------------------------

\def\WEB{\.{WEB}} % A TeX macro definition in limbo.

@n/ @% The slash tells Fortran to recognize '//' as the start of a short
    @% comment rather than the conventional concatenation symbol.
@* DEMO. This example demonstrates the use of named modules, and some other
features of~\WEB.

@#ifndef N
	@m N 100 /* If you define this macro from the command line by
			saying ``\.{-mN=200}'', that definition will
			override this one. */ 
@#endif

@a
	program main 
	@<Common declarations@> 
	@<Read data@>
	@<Process data@>
	@<Graph results@>
	end

@ Accreting and inserting |common| declarations is an interesting use of
named modules.

@f @<Com...@> common

@<Com...@>=
	real a(N)
	common a

@ Possibly after many more modules that aren't shown here, we get to code
related to graphics. Here we accrete more information into the common
declarations. The discretized abscissa data is held in the array~|xx|; the
ordinate is in~|yy|.
@<Com...@>=
	real xx(N), yy(n) // Example: |call curve(xx,yy,N,1)|
	common/graphs/ xx,yy

@* INDEX.
