Difference between revisions of "EPScript/Operators"
(→or) |
(→not) |
||
Line 27: | Line 27: | ||
===not=== | ===not=== | ||
Returns true if the expression is false and false if the expression is true. | Returns true if the expression is false and false if the expression is true. | ||
− | + | <if test="!is_set( creators )"> | |
− | + | ... | |
− | <if test="!is_set( creators )"> | + | </if> |
− | ... | ||
− | </if> | ||
− | |||
− | |||
==Comparison Operators== | ==Comparison Operators== |
Revision as of 13:31, 9 October 2006
EPScript | ||
Contents
Operators
Logical Operators
and
Returns true if both the left-hand and the right-hand expressions return true.
<if test="type = 'book' and is_set( creators )"> ... </if>
or
Returns true if at least one of the expressions returns true. {{{1}}}
not
Returns true if the expression is false and false if the expression is true.
<if test="!is_set( creators )"> ... </if>
Comparison Operators
lt
Returns true if the left-hand expression is less than the right-hand expression. This is only applicable to expressions that return numeric values.
<if test="length(editors) lt 6"> ... </if>
gt
Returns true if the left-hand expression is greater than the right-hand expression. This is only applicable to expressions that return numeric values.
<if test="length(editors) gt 1"> ... </if>
equals
Returns true if the left-hand expression is equal to the right-hand expression. This applies to numeric, boolean, and string values.
<if test="type = 'patent'"> ... </if>
not equals
The inverse of the equals operator, this returns true if the expressions are not equal.
<if test="type != 'book'"> ... </if>