help | 2 The Graphical Script Editor | Variables and System Functions | Analysis of Variables in Expressions
Analysis of Variables in Expressions
If you would like to analyze a variable or system function (e.g. in the blocks “Evaluate” or “Choose Announcement”, you can compare a variable with an expression.
This expression can contain all the user-defined variables of this script as well as all system functions. The expressions used here are created in the syntax of Visual Basic Script:
*A variable can be either a sequence of characters (“3”) or a numeric value (3).
*It is possible to link variables.
The expression
=“Call from the number” & CallerNumber()
during the call handling of a call from the number 0123456789, will result in
Call from the number 0123456789
*Calculation operation with variables
The expression
a=3*b
will be numerically evaluated so that a will be assigned the result of the calculation operation. This requires that b contains a numeric value or a string, which is interpretable as a numeric value.
*Addition
This operation is executed depending on the type of variable. The expression
=”3” + CalledNumber()
results, during the treatment of a call with CalledNumber()=234, in a string in the form
"3234".
The expression
= 3 + CalledNumber()
results, during the treatment of a call with CalledNumber()=234, in a numeric value
237
* 
If the variable or a system function (here CalledNumber()) contains a string, which is not interpretable as a numeric value, then this expression will generate an error (type mismatch) and the call will be terminated.
 
*Comparison
This operation runs analogous to Addition. Thus, the expression generates
"333" > CalledNumber()
a comparison of the strings.
If the variables to be compared are strings, they will be compared as ASCII strings (standard string comparison) starting with the first character. The first discrepency (> or <) determines the result.
Example:
The following strings exist: "A"=65; "a"=97; "b"=98; "c"=99.
Then the following apply:
"aab" < "aac", because 1st character a=a; 2nd character a=a; 3rd character b<c
"aab" > "aAc", because 1st character a=a; 2nd character a>A
The expression
333 > CalledNumber()
compares the numeric value. In this case it is once again necessary that the system function contains a numeric value.
Last modified date: 06.16.2023