## dbCGI |
## Formula Expressions |
|||||||||||||||||||||||||||||||||||||||||||||||

These formula expressions can be used in evaluate directives and in an evaluate condition in an if directive.
You can refer to form variables by name alone inside a formula expression, provided the variable name starts with a letter or the underscore ("_"), and contains only letters, digits and the underscore. You can still refer to other variables using the formatting escapes, provided the substitution would result in valid syntax for the formula expressions.. The common arithmetic operators (+, -, *, /) and comparison operators (=, <>, !=, >, >=, <=) are available, as well as the following:
Boolean expressions return 1 for true and 0 for false. It is strongly recommended that you put spaces around operators - future versions of dbCGI may include new operators formed by using more than one operator character from the existing set of operator characters. Evaluation precedence is as follows, from highest to lowest: -
Unary operators (~, !, ?) -
Substring operators (\, $) -
String Concatenation (#) -
Multiplication and division (*, /) -
Addition and subtraction (+, -) -
Boolean comparison operators (=, <>, !=, >, >=, <=) -
Bitwise boolean operators (|, &, ^)
The order of evaluation can be overridden by using parenthises - "(...)". Literal strings can be inserted into expressions by enclosing them in either single or double quote characters. |