| HALCON Reference Manual / Control | Operators |
if — Conditional statement.
if( : : Condition : )
if is a conditional statement that starts an if block. The Condition parameter must evaluate to a boolean or integer expression.
If Condition evaluates to true (not 0), the following block body up to the next corresponding block statement elseif, else, or endif is executed. Reaching the end of the block the execution continues after the corresponding endif statement.
If Condition evaluates to false (0), the execution is continued at the next corresponding block statement elseif, else, or endif.
| Condition (input_control) | integer → (integer) |
| Condition for the if statement. | |
| Default value: 1 | |
If the condition is correct if (as operator) returns 2 (H_MSG_TRUE). Otherwise an exception is raised and an error code returned.
Foundation
| HALCON Reference Manual / Control | Operators |
| Version 9.0.2 | Copyright © 1996-2010 MVTec Software GmbH |