#set TITLE = "flow of control"
#include top

.SH #if - #elseif - #else - #endif
Alter execution flow of control based on a 
#set FILE = "condexes.html"
#set TAG = "conditional expression."
#include link
\fC#if\fR statements can be nested.
.LP
\fBif\fR and \fBendif\fR are required.  
\fBelseif\fR and \fBelse\fR are optional.
An example of an \fBif\fR construct:
.LP
.nf
\0#if @mode = A
    <h4>Mode is A</h4>
\0#elseif @mode = B
    <h4>Mode is B</h4>
\0#else
    <h4>Mode not given</h4>
\0#endif
.fi
.LP
More examples:
.LP
.nf
\0#if @tag = TOTAL
\0#if @meas > 0.0 && @meas < 8.5
\0#if @name = ""
\0#if @type like "west*" || @type = "bl*"
\0#if $arith(@A+@B) > 10
.fi

#include space

.ig >>
<a name=exit></a>
.>>

.SH #exit
Terminate interpretation of the template immediately.  
Any content encountered up to the \fC#exit\fR will be displayed.
Example:
.LP
.nf
\0#if @_DEBUG = 1
\0    #exit
\0#endif
.fi

#include space

.ig >>
<a name=include></a>
.>>

.SH #include
Include script code from a file.
\fIfilename\fR may be relative to your project \fC./pages\fR dir; if not found there
\fIfilename\fR will be used directly.
Includes may be nested.
It is often very useful to have all of the pages in a project \fC#include\fR
a common header at the top, and a common footer at the bottom.
\fC#include\fR is also useful in sharing template code chunks that are
utilized in more than one page, and for encapsulating external URL references
that are used in more than one place.
.LP
Usage: \fC#include  \fIfile\fR
.LP
\fC#include\fRd code is interpreted in the same manner as ordinary code.
However, \fC#break\fR and \fC#continue\fR
may be used only if the corresponding loop / #endloop is also within
the included file. \fC#return\fR
may be used to immediately exit the included file and resume execution
in the including file.
.LP
Security concern: user-supplied values (such as CGI user variables) should not be used to build the filename, unless
proper measures are taken to detect and remove the \fC../\fR construct (used as a hack 
to see higher levels of the file system).
.LP
Example: \fC#include projectheader\fR

#include space

.SH #return
Terminate execution of an \fC#include\fRd file immediately.
Execution is resumed in the including template, at the statement 
immediately following the \fC#include\fR.
.LP
Usage: \fC#return\fR

#include bottom
