Table 4.2: operators, Catc manual ver. 1.21 – Teledyne LeCroy Merlins Wand - CSL manual (CATC Scripting Language Manual) User Manual
Page 17

11
CATC Scripting Language for Bluetooth Analyzers
CATC
Manual Ver. 1.21
Operator
Symbol
Description
Operand
Types
Result
Types Examples
Index Operator
[ ]
Index or
subscript
Raw Bytes
Integer
Raw = '001122'
Raw[1] = 0x11
List
Any
List = [0, 1, 2, 3, [4, 5]]
List[2] = 2
List[4] = [4, 5]
List[4][1] = 5
*Note: if an indexed Raw value is assigned to any
value that is not a byte ( > 255 or not an integer), the
variable will be promoted to a list before the
assignment is performed.
Associative Operator
( )
Associative
Any
Any
( 2 + 4 ) * 3 = 18
2 + ( 4 * 3 ) = 14
Arithmetic Operators
*
Multiplication
Integer-integer
Integer
3 * 1 = 3
/
Division
Integer-integer
Integer
3 / 1 = 3
%
Modulus
Integer-integer
Integer
3 % 1 = 0
+
Addition
Integer-integer
Integer
2 + 2 = 4
String-string
String
"one " + "two" = "one two"
Raw byte-raw byte
Raw
'001122' + '334455' =
'001122334455'
List-list
List
[1, 2] + [3, 4] = [1, 2, 3, 4]
Integer-list
List
1 + [2, 3] = [1, 2, 3]
Integer-string
String
"number = " + 2 = "number = 2"
*Note: integer-string concatenation uses decimal
conversion.
String-list
List
"one" + ["two"] = ["one", "two"]
-
Subtraction
Integer-integer
Integer
3 – 1 = 2
Table 4.2: Operators