Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

Use the tabs on the upper right to switch to a different programming language.

ifelseifelseIfelseIfelse (Operator)

Name

ifelseifelseIfelseIfelse — Conditional statement with alternative.

Warning

ifelseifelseIfelseIfelseIfelse is obsolete and is only provided for reasons of backward compatibility. ififIfIfIf should be used instead.

Signature

ifelse( : : Condition : )

Herror ifelse(const Hlong Condition)

Herror T_ifelse(const Htuple Condition)

void Ifelse(const HTuple& Condition)

static void HOperatorSet.Ifelse(HTuple condition)

Description

ifelseifelseIfelseIfelseIfelse is a conditional statement with an alternative. If the condition is true (i.e., not 0), all expressions and calls between the head and operator elseelseElseElseElse are performed. If the condition is false (i.e., 0) the part between elseelseElseElseElse and endifendifEndifEndifEndif is executed. Note that the operator is called ifelseifelseIfelseIfelseIfelse and it is displayed as if in the program text area.

Parameters

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

Condition for the if statement.

Default value: 1

Result

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

Alternatives

ififIfIfIf

See also

elseelseElseElseElse, elseifelseifElseifElseifElseif, forforForForFor, whilewhileWhileWhileWhile, repeatrepeatRepeatRepeatRepeat, untiluntilUntilUntilUntil

Module

Foundation