quick server pages
   
Manual page for functions(TDH)

Available functions

arithmetic
strings
commalists
shell
sql
HTML
dates
times



How to use functions

Functions usually take one or more arguments and return a value. Functions may be used with #set, #if, #elseif, #while or #call. Examples:

 #call $setdatefmt( "yyyy/mm/dd" )
 
 #set prefix = $substring( @filename, 1, 3 )
 
 #set email = $change( " ", "_", @email )
 
 #if $isnumber(@A) = 1 && @A != 0
    #set C = $arith( @B/@A )
 #endif



#call

#call may be used to invoke a function when no return value is to be collected.
Example: #call $setdatefmt( "yyyy/mm/dd" )


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.


Adding custom functions

Custom functions may easily be added to the file custom.c. That file contains further instructions.


quick server pages    
Copyright Steve Grubb    


Markup created by unroff 1.0,    March 16, 2004.