D.9 statements, Expression statements, Statements – Teledyne LeCroy Merlins Wand - Users Manual User Manual

Page 285

Advertising
background image

269

CATC M

ERLIN

S

W

AND

2.00

C

HAPTER

D

User’s Manual

CATC Scripting Language

In addition to the operators, the following are keywords in CSL:

D.9 Statements

Statements are the building blocks of a program. A program is made up of
list of statements.

Seven kinds of statements are used in CSL: expression statements, if
statements, if-else statements, while statements, for statements, return
statements, and compound statements.

Expression Statements

An expression statement describes a value, variable, or function.

<

expression>

Here are some examples of the different kinds of expression statements:

Value:

x + 3;

Variable:

x = 3;

Function:

Trace ( x + 3 );

Keyword

Usage

select

select

expression

set

define a global variable

const

define a constant

return

return

statement

while

while

statement

for

for

statement

if

if

statement

else

if-else

statement

default

select

expression

null

null value

in

input context

out

output context

Advertising