Enum CaseClauseSemanticFlags
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 = 8The 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
naLongof2,Case 1.7matches, because1.7is theLong2; the expressionn = 1.7compares twoDoublevalues, and isFalse.ComparisonForm = 2The clause is a comparison (
Case Is > 5), for which MS-VBAL states that the expressionselect-expression > 5is evaluated.None = 0No flags set.
RangeForm = 4The 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 = 1The clause is a single value (
Case 5), which MS-VBAL says "is compared with the value of select-expression", without saying how.