Preprocess or integer arithmetic, Preprocessor integer arithmetic – Teledyne LeCroy SAS Suite User Manual User Manual
Page 236
![background image](/manuals/353605/236/background.png)
Version 6.25
SASSuite User Manual
226
LeCroy Corporation
Preprocess
or integer
arithmetic
The user can declare DWORD variables, make arithmetic operations and use them in
field and parameters assignments
Note: Arithmetic expressions are allowed only in numeric variable assignments.
E
XAMPLES
:
Legal Operations
x = 2
y = ( z = 12 ) + ( SOME_DEC_DATA + 36 ) / 8
z = 0x1 << 5
s = "Some Hex Data" # constant may be used in operations
x++
y--
z += ( x + y )
x = ( ( y & 0xFF ) >> 5 ) / 12
SOF ( Repeat = x, Idle = y )
X
{
Field16 = 0xEEEE # Example of the data payload assignment which uses
both integer variables, constants, hex literals and data patterns
Data = { y y y y 7a7a7a7a "Some Hex Data" "Some Hex Data" 8b8b8b8b
z z z z [PATTERN_3] }
}
( Repeat = 10, Idle = y ) # uses integer variable for parameter/setting
Illegal operations
x = y + 2
SOF ( Repeat = (x+y)*7 ) # - illegal, use z = (x+y)*7 SOF ( Repeat = z ) instead