This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help
Literal Operators are used to manipulate pieces of text. The texts may be the content of a literal variable or the text equivalent of any other variable (date, code, value etc.). They may be used within literal expressions.
Table of literal operators
Operator |
|
Description |
|---|---|---|
: |
Concatenation |
The operands are two pieces of text. The result is a text string that combines the two. If the value of Q10 is " You can also express this by inserting the variables within the quotation marks |
# |
Repeat |
The first operand is a piece of text and the second is a quantity. The result is a text string consisting of the piece of text repeated quantity times. For example Q10#3 gives "Apple pieApple pieApple pie" |
@
|
Selection |
When the first operand is a piece of text and the second operand is a shorter piece of text, this tests if the second operand is included in the first. If the second piece of text is contained within the first, the result is the position that it appears for the first time. If the second piece of text is not present, the result is NR. For example When the first operand is a piece of text and the second operand is a number, this tells you which character appears at that position in the text. For example When the first operand is a piece of text and the second operand is a list or range of numeric values, this creates a piece of text made up of the characters specified by the list or range. For example |