The operators used in the expressions are displayed in PrintShop Mail in the "Components" section of The Expression Editor. To add an operator in your Expression Edit field at the location where your cursor is located, simply click on the desired operator (you can also type any of these operators except the Line Feed character, which is not on your keyboard).
There are more than one kind of operator. Here is an exhaustive list.
Operator |
Definition |
Example | Result |
---|---|---|---|
+ |
Add |
23 + 11 | 34 |
- |
Subtract |
30 - 2 | 28 |
* |
Multiply |
2 * 5 | 10 |
/ |
Divide |
42 / 2 | 21 |
Operators |
Definition |
Example | Result |
---|---|---|---|
< |
Less than |
(32 < 21) | FALSE |
<= |
Less than or equal |
(21 <= 21) | TRUE |
<> |
Not equal |
("Foo" <> "Bar") | TRUE |
> |
Greater than |
(55 > 3) | TRUE |
>= |
Greater than or equal |
(43 >= 44) | FALSE |
= |
Equal |
("String" = "Strings") | FALSE |
Operators |
Definition |
Description |
---|---|---|
( and ) |
Left and Right parentheses |
Gives priority to what is inside of the parentheses just like in mathematical operations. Can also be used to give priority to conditions. |
" " |
Double quotes |
Literal strings (text) entered into an expression needs to be surrounded by double-quotes to be identified as such (e.g. "Hello, World!"). However, no other component should use double-quotes (number, functions, database fields or variables). |
, |
Comma |
Commas in strings (e.g. "hello, henry") are simply printed as commas. Commas in functions (e.g. COUNTER(1, 50, 2) ) are used to separate the parameters used by that function. |
. |
Decimal point |
Decimal points in strings (e.g. "This is a sentence.") are simply printed as a decimal point. Decimal points in numbers (e.g. 529.54) are used to indicate decimal values such as currency. |
& |
Ampersand |
The ampersand is used to concatenate (put together) two strings. For example, "Hello " & "World!" will result in "Hello World!". |
¶ |
New Line |
The new line character will create a Carriage Return/Line Feed in a string. This is useful to create an expression that will print out in multiple separate lines in your document. Note that the new line character is added with surrounding ampersands, as it is always concatenated. |