Hex Editor
Hex Editor - Binary File Editing Software for Windows

for Statement

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >

for statement has the following syntax:

statement-for:
for (init-expr; condition-expr; increment-expr)
    statement-block
      

for statement is equivalent to the following construct:

init-expr;
while (condition-expr)
{
    statement-block;
    increment-expr;
}
      

It evaluates statements in statement-block while condition-expr evaluates to a non-zero value.

Note that unlike C/C++, all for statement expressions must be present and cannot be omitted. Structure Viewer does not support unary operators like ++, --, +=, -= and others, so increments must be specified in the form of "i = i + 1" instead of "++i".

init-expr must have the following syntax:

init-expr:
var name = expr
      
for (var i = 0; i < 10; i = i + 1)
{
    int a;
}
      
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.