![Advantech UbiQ Скачать руководство пользователя страница 54](http://html1.mh-extra.com/html/advantech/ubiq/ubiq_user-manual_2856809054.webp)
UbiQ Scenario Manager User Manual
48
A block statement typically appears as the body of another statement, such as the if
statement.
Syntax
block-statement :
{ declaration-list statement-list }
declaration-list :
declaration or
declaration-list declaration
statement-list :
°°°°°°°°°°statement or
°°°°°°°°°°statement-list statement
If there are declarations, they must come before any statements. The scope of each
identifier declared at the function including the block-statement.
This example illustrates a compound statement:
if ( i > 0 )
{
line[i] = x;
x=x+1;
i=i-1;
}
In this example, if i is greater than 0, all statements inside the compound statement
are executed in order.
break statement
The break statement terminates the execution of the nearest enclosing for, or while
statement in which it appears. Control passes to the statement that follows the termi-
nated statement.
Syntax
break-statement :
break;
Within nested statements, the break statement terminates only the for, or while state-
ment that immediately encloses it. You can use a return statement to transfer control
elsewhere out of the nested structure.
This example illustrates the break statement:
Содержание UbiQ
Страница 1: ...User Manual UbiQ Scenario Manager User Manual V1 03...
Страница 4: ...UbiQ Scenario Manager User Manual iv...
Страница 7: ...Chapter 1 1 Introduction...
Страница 13: ...Chapter 2 2 Getting Started...
Страница 37: ...Chapter 3 3 Tutorials...
Страница 47: ...Chapter 4 4 Basic of Smart C Script Language...
Страница 62: ...UbiQ Scenario Manager User Manual 56...
Страница 63: ...Chapter 5 5 Functions Reference...