ClassesClassesClassesClasses | | | | 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).

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

casecaseCasecaseCaseCase (Operator)

Name

casecaseCasecaseCaseCase — Jump label that starts a branch within a switchswitchSwitchswitchSwitchSwitch block.

Signature

case( : : Constant : )

Herror case(const Hlong Constant)

Herror T_case(const Htuple Constant)

Herror case(const HTuple& Constant)

void Case(const HTuple& Constant)

void HOperatorSetX.Case([in] VARIANT Constant)

static void HOperatorSet.Case(HTuple constant)

Description

casecaseCasecaseCaseCase defines a jump label within a switchswitchSwitchswitchSwitchSwitch block. It starts a branch that is executed if the value of the control expression of the switchswitchSwitchswitchSwitchSwitch statement matches the constant integer expression that is defined in ConstantConstantConstantConstantConstantconstant. For this parameter only constant integer expressions are accepted. Variable expressions and other data types are not allowed.

As in the programming languages C, C++, and C# the casecaseCasecaseCaseCase statement does not open a block that is automatically left at the next casecaseCasecaseCaseCase or defaultdefaultDefaultdefaultDefaultDefault statement. In contrast, it works just like a goto label that is accessed if the label matches. In order to leave a casecaseCasecaseCaseCase branch and continue execution after the end of the switchswitchSwitchswitchSwitchSwitch block, the breakbreakBreakbreakBreakBreak statement can be used anywhere within the switchswitchSwitchswitchSwitchSwitch block.

Parameters

ConstantConstantConstantConstantConstantconstant (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Constant integer expressions that determines for which value of the switch control expression the branch is accessed.

Default value: 1

Result

casecaseCasecaseCaseCase (as an operator) always returns 2 (H_MSG_TRUE).

Alternatives

elseifelseifElseifelseifElseifElseif

See also

switchswitchSwitchswitchSwitchSwitch, defaultdefaultDefaultdefaultDefaultDefault, endswitchendswitchEndswitchendswitchEndswitchEndswitch, ififIfifIfIf

Module

Foundation


ClassesClassesClassesClasses | | | | Operators