Operators - Snom 4S Administrator's Manual

Sip proxy/registrar version 2.30
Table of Contents

Advertisement

[
S N O M
operator expects a number, it first determines the value of that string,
performs the operation and then converts the result back into a string.
This is also the case for Boolean operators as seen in the "if" statement.
There is no length restriction to strings. Short strings are handled
efficiently; strings with a length of more than 64 kB are allocated and
freed from memory on demand. This can significantly slow down the
performance of the proxy and (depending on the memory management
of the operating system) take away resources.

Operators

Arithmetic Operators
Arithmetic operators are +, -, *, /, %. They take the numerical
value of their left and right hand side and perform the appropriate
operation. % performs modulo. All operations are done on integer
numbers, floating point is not supported.
Logical Operators
Logical operators include && (and), || (or) and ! (not).
The and operator evaluates the right hand side only if the left
hand side evaluated to "true". The or operator evaluates the right hand
side only if the left hand side evaluated not to "true". This is important
when the expression has a side effect.
The not operator return only "false" when the right hand side was
"true".
Comparisons
Comparisons always return the value "true" or "false". The proxy
implements the operators
The operators == and != compare for equality and non-equality.
The comparison is done non-case sensitive.
The relational comparision operators >, >=, <, <= first check
if both sides of the comparisons are integer numbers. If this is the case,
they compare the value of the left and right hand side. Otherwise, they
perform a non-case sensitive string comparison of the two sides.
38 • Scripting
4 S P
/ R
R O X Y
E G I S T R A R
M
]
A N U A L

Advertisement

Table of Contents
loading

Table of Contents