.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>quisp: flow of control</title>
<body bgcolor=99cc99 vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td align=right><a href="quisp_home.html">
<img src="img/quisp2.gif" border=0><br><small>quick server pages</a> &nbsp; &nbsp; </td></tr>
<td>
.>>

.TH flow of control TDH "01-JUN-2005   TDH scg@jax.org" 

.SH #if - #elseif - #else - #endif
Alter execution flow of control based on a 
.ig >>
<a href="condexes.html">
.>>
\0conditional expression.
.ig >>
</a>
.>>
\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

.ig >>
<br><br><br>
.>>

.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

.ig >>
<br><br><br>
.>>

.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

.ig >>
<br><br><br>
.>>

.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

.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="quisp_home.html">
<img src="img/quisp2.gif" border=0></a><br>
<small>quick server pages &nbsp; &nbsp;<br>
<a href="Copyright.html">Copyright Steve Grubb</a> &nbsp; &nbsp;
</td></tr>
</table>
.>>
