.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: functions</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 functions TDH "16-MAR-2004   TDH scg@jax.org" 

.SH Available functions
.LP
.ig >>
<a href="functions.html#arithmetic">
.>>
\0arithmetic
.ig >>
</a>
.>>
.br
.ig >>
<a href="functions.html#strings">
.>>
\0strings
.ig >>
</a>
.>>
.br
.ig >>
<a href="functions.html#commalists">
.>>
\0commalists
.ig >>
</a>
.>>
.br
.ig >>
<a href="shell.html">
.>>
\0shell
.ig >>
</a>
.>>
.br
.ig >>
<a href="sql.html">
.>>
\0sql
.ig >>
</a>
.>>
.br
.ig >>
<a href="functions.html#html">
.>>
\0HTML
.ig >>
</a>
.>>
.br
.ig >>
<a href="functions.html#dates">
.>>
\0dates
.ig >>
</a>
.>>
.br
.ig >>
<a href="functions.html#times">
.>>
\0times
.ig >>
</a>
.>>
.br

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

.SH How to use functions
.LP
Functions usually take one or more arguments and return a value.
Functions may be used with \fC#set\fR, \fC#if\fR, \fC#elseif\fR, \fC#while\fR or \fC#call\fR.
Examples:
.nf
\0#call $setdatefmt( "yyyy/mm/dd" )
\0
\0#set prefix = $substring( @filename, 1, 3 )\fR
\0
\0#set email = $change( " ", "_", @email )\fR
\0
\0#if $isnumber(@A) = 1 && @A != 0
\0   #set C = $arith( @B/@A )
\0#endif
.fi

.ig >>
<br><br><br>
.>>
.SH #call
\fC#call\fR may be used to invoke a function when no return value is to be collected.
.br
Example: \fC#call $setdatefmt( "yyyy/mm/dd" )\fR

.ig >>
<br><br><br>
.>>
.SH Function syntax
Function names always begin with a dollar sign.  Passed parameters are separated by 
a comma and optionally, whitespace.  The parser is not strict about use of quotes but 
they are required for constants that contain embedded whitespace or comma.  
Some functions accept a variable number of arguments.
Function calls cannot be nested.

.ig >>
<br><br><br>
.>>
.SH Adding custom functions
Custom functions may easily be added to the file \fCcustom.c\fR.
That file contains further instructions.

.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>
.>>
