HALCON Reference Manual 10.0.2
Table of Contents / Control ClassesClassesClasses | | | Operators

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

ifififIfIf (Operator)

Name

ifififIfIf — Conditional statement.

Signature

if( : : Condition : )

Herror if(const Hlong Condition)

Herror T_if(const Htuple Condition)

Herror if(const HTuple& Condition)

void HOperatorSetX.If([in] VARIANT Condition)

static void HOperatorSet.If(HTuple condition)

Description

ifififIfIf is a conditional statement that starts an if block. The ConditionConditionConditionConditioncondition parameter must evaluate to a boolean or integer expression.

If ConditionConditionConditionConditioncondition evaluates to 'true'"true""true""true""true" (not 0), the following block body up to the next corresponding block statement elseifelseifelseifElseifElseif, elseelseelseElseElse, or endifendifendifEndifEndif is executed. Reaching the end of the block the execution continues after the corresponding endifendifendifEndifEndif statement.

If ConditionConditionConditionConditioncondition evaluates to 'false'"false""false""false""false" (0), the execution is continued at the next corresponding block statement elseifelseifelseifElseifElseif, elseelseelseElseElse, or endifendifendifEndifEndif.

Parameters

ConditionConditionConditionConditioncondition (input_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Condition for the if statement.

Default value: 1

Result

If the condition is correct ifififIfIf (as operator) returns 2 (H_MSG_TRUE). Otherwise an exception is raised and an error code returned.

Alternatives

elseifelseifelseifElseifElseif, elseelseelseElseElse

See also

forforforForFor, whilewhilewhileWhileWhile, untiluntiluntilUntilUntil

Module

Foundation


Table of Contents / Control ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH