![]() quick server pages |
Available functions
arithmetic
How to use functionsFunctions 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 syntaxFunction 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 functionsCustom functions may easily be added to the file custom.c. That file contains further instructions. |
![]() quick server pages Copyright Steve Grubb |