UbiQ Scenario Manager User Manual
50
of the statements in the body are ignored, and execution resumes at the top of the
loop with the evaluation of the loop°Øs test.
expression statement
When an expression statement is executed, the expression is evaluated according to
the rules outlined in section: Expressions and Assignments.
Syntax
expression-statement :
expressions ;
An empty expression statement is called a null statement.
These examples demonstrate expression statements.
x = ( y + 3 ); /* x is assigned the value of y + 3 */
x=°±abcdefg°±; /* x is assigned to °×abcdefg°± */
y=sum(x ); /* Function call returning value */
z=0xA8; /* z is assigned to the hex value 0xA8 */
for statement
The for statement lets you repeat a statement or compound statement a specified
number of times. The body of a for statement is executed zero or more times until an
optional condition becomes false. You can use optional expressions within the for
statement to initialize and change values during the for statement°Øs execution.
Syntax
for-statement :
for ( init-expression ; cond-expression ; loop-expression)
block-statement
Execution of a for statement proceeds as follows:
* The init-expression, if any, is evaluated. This specifies the initialization for the loop.
There is no restriction on the type of init-expression.
* The cond-expression, if any, is evaluated. This expression must have arithmetic. It
is evaluated before each iteration. Three results are possible:
(1) If cond-expression is true (nonzero), statement is executed; then loop-expression,
if any, is evaluated. The loop-expression is evaluated after each iteration. There is no
restriction on its type. The process then begins again with the evaluation of cond-
expression.
(2) If cond-expression is omitted, cond-expression is considered true, and execution
proceeds exactly as described in the previous paragraph.
Содержание 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...