Hex Editor
Hex Editor - Binary File Editing Software for Windows

if Statement

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

if statement has the following syntax:

statement-if:
if (expr)
    statement-block | { statement-block * }
[else
    statement-block | { statement-block * }
]

statement-block:
    statement | field-declaration
      

expr is evaluated at run-time and if true, the first statement-block is evaluated, otherwise, the second statement-block is evaluated. If it is omitted and expr is false, nothing is evaluated and control flows to the next statement or declaration. If multiple statements or declarations need to be specified in the body of if or else, use the curly braces. For example:

struct A
{
    int a;
    if (a>0)
        float b;
    else
    {
        double b;
        int c;
    }
};
      
< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.