Table of Contents

Enum CaseClauseSemanticFlags

Namespace
RDCore.SDK.Semantics.Flags
Assembly
RDCore.SDK.dll

The semantic flags that can be attached to a range clause of a Case (MS-VBAL 5.4.2.10): which form it takes, and how its value is compared with the selector.

[Flags]
public enum CaseClauseSemanticFlags

Fields

ComparedInSelectorType = 8

The value of the clause is converted to the declared type of the selector, and compared with the selector in that type, where the comparison of the two as an expression has another effective type (MS-VBAL 5.6.9.5): the result can differ from the expression's.

👉 What MS-VBA does, and RD-VBA with it (RD-VBAL 5.4.2.10): with n a Long of 2, Case 1.7 matches, because 1.7 is the Long 2; the expression n = 1.7 compares two Double values, and is False.

ComparisonForm = 2

The clause is a comparison (Case Is > 5), for which MS-VBAL states that the expression select-expression > 5 is evaluated.

None = 0

No flags set.

RangeForm = 4

The clause is a range (Case 1 To 10), for which MS-VBAL states that the expression ((select-expression) >= (1)) And ((select-expression) <= (10)) is evaluated.

ValueForm = 1

The clause is a single value (Case 5), which MS-VBAL says "is compared with the value of select-expression", without saying how.