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.

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

ifelseifelseIfelseIfelseifelse (Operator)

Name

ifelseifelseIfelseIfelseifelse — Conditional statement with alternative.

Warning

ifelseifelseIfelseIfelseIfelseifelse is obsolete and is only provided for reasons of backward compatibility. ififIfIfIfif 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)

def ifelse(condition: int) -> None

Description

ifelseifelseIfelseIfelseIfelseifelse 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 elseelseElseElseElseelse are performed. If the condition is false (i.e., 0) the part between elseelseElseElseElseelse and endifendifEndifEndifEndifendif is executed. Note that the operator is called ifelseifelseIfelseIfelseIfelseifelse and it is displayed as if in the program text area.

Parameters

ConditionConditionConditionConditionconditioncondition (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Condition for the if statement.

Default: 1

Result

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

Alternatives

ififIfIfIfif

See also

elseelseElseElseElseelse, elseifelseifElseifElseifElseifelseif, forforForForForfor, whilewhileWhileWhileWhilewhile, repeatrepeatRepeatRepeatRepeatrepeat, untiluntilUntilUntilUntiluntil

Module

Foundation