Teledyne-lecroy Protocol Analyzers File-Based Decoding User Manual Manuale Utente Pagina 32

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 82
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la 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.
Vedere la pagina 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 81 82

Commenti su questo manuale

Nessun commento