Teledyne-lecroy Protocol Analyzers File-Based Decoding User Manual Manual de usuario Pagina 32

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 82
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 31
Chapter 7: Statements File-based Decoding User Manual
26 LeCroy Corporation
7.7 Compound Statements
A compound statement, or statement block, is a group of one or more statements that
is treated as a single statement. A compound statement is always enclosed in
curly
braces ( {} ). Each statement within the curly braces is followed by a semicolon;
however, a semicolon is not used following the closing curly brace.
The syntax for a compound statement is
{
<first_statement>;
<second_statement>;
...
<last_statement>;
}
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.
str = "";
if (3 && 3)
{
result = "True!";
str = FormatEx ( "%s", result );
}
Compound statements are required for function declarations and are commonly used in
if, if-else, while, and for statements.
Vista de pagina 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 81 82

Comentarios a estos manuales

Sin comentarios