beautypg.com

Teledyne LeCroy USB Script Decode Manual User Manual

Page 31

background image

25

C

HAPTER

7

CATC Scripting Language for USB

Statements

...
;

}

An example of a compound statement is

{

x = 2;
x + 3;

}

It's also possible to nest compound statements, like so:

{

x = 2;
{

y = 3;

}
x + 3;

}

Compound statements can be used anywhere that any other kind of statement can
be used.

if (3 && 3)
{

result = "True!";
Trace(result);

}

Compound statements are required for function declarations and are commonly
used in if, if-else, while, and for statements.