Enum ComparisonOperatorSemanticFlags
The semantic flags of a relational operator operation (MS-VBAL 5.6.9.5).
[Flags]
public enum ComparisonOperatorSemanticFlags
Fields
All = IntegralNumericEffectiveType | FixedPointNumericEffectiveType | FloatingPointNumericEffectiveType | HasNaNOperand | BooleanEffectiveType | ByteEffectiveType | IntegerEffectiveType | LongEffectiveType | LongLongEffectiveType | SingleEffectiveType | DoubleEffectiveType | CurrencyEffectiveType | DecimalEffectiveType | StringEffectiveType | StringComparisonBinary | StringComparisonText | NullEffectiveType | ErrorEffectiveType | HasStandardErrorCodes | IsVariantStringNumericException | IsVariantComparedWithStringAsText | LikePatternHasEmptyCharList | LikePatternIsInvalid | IsVariantStringThatIsNoValueRankedCombines all values.
BooleanEffectiveType = 16The semantic effective type of the comparison operation is
VBBooleanType.ByteEffectiveType = 32The semantic effective type of the comparison operation is
VBByteType.CurrencyEffectiveType = 2048DecimalEffectiveType = 4096DoubleEffectiveType = 1024ErrorEffectiveType = 131072The semantic effective type of the comparison operation is
VBErrorType.FixedPointNumericEffectiveType = 2The semantic effective type of the comparison operation is
VBCurrencyTypeorVBDecimalType.FloatingPointNumericEffectiveType = 4The semantic effective type of the comparison operation is
VBSingleTypeorVBDoubleType.HasNaNOperand = 8The operation involves one or more
NaNfloating-point values.HasStandardErrorCodes = 262144trueif bothErrorvalues are between0and65535(standard error codes range).👉 The result of a comparison operation where the effective type is
VBErrorTypeis otherwise undefined.IntegerEffectiveType = 64IntegralNumericEffectiveType = 1The semantic effective type of the comparison operation is an integral numeric data type.
IsVariantComparedWithStringAsText = 1048576trueif one operand is aVBVariantholding a number, aDateor aBoolean, and the other aStringthat is noVBVariant- a variable declaredAs String, a literal: the two are compared as text, as MS-VBA compares them.👉 MS-VBAL §5.6.9.5 makes the effective type the number's, which makes a
Stringthat is no number a type mismatch (13); MS-VBA compares the text of theVariant's value with theString, as Microsoft Learn documents it (RD-VBAL §5.6.9.5).IsVariantStringNumericException = 524288trueif both operands areVBVariantwith one having aVBStringTypesubtype and the other anyVBNumericType.👉 In such cases the numeric
VBVariantoperand is always considered less than the stringVBVariantoperand.IsVariantStringThatIsNoValueRanked = 8388608trueif one operand is aVBVariantholding aStringthat is no value of the effective type, and the other a number, aDateor aBooleanthat is noVBVariant: theStringranks above it, whatever their values, as MS-VBA compares them.👉 MS-VBAL §5.6.9.5 makes the
String's conversion to the effective type a type mismatch (13); MS-VBA raises nothing, and ranks the two as it ranks twoVBVariantoperands (IsVariantStringNumericException; RD-VBAL §5.6.9.5).LikePatternHasEmptyCharList = 2097152trueif the pattern of aLikeoperation is written in the code, and has a[]or a[!].👉 MS-VBAL §5.6.9.6 makes either a list of no character; MS-VBA matches
[]with no character at all, and[!]with a!(RD-VBAL §5.6.9.6).LikePatternIsInvalid = 4194304trueif the pattern of aLikeoperation is written in the code, and is not a validlike-patternin the comparison mode of the operation: it has an unterminated list, or a range whose first character is above its last.👉 MS-VBAL §5.6.9.6 raises error 93 (Invalid pattern string) for such a pattern; MS-VBA raises it only where a match reaches the invalid element (RD-VBAL §5.6.9.6).
LongEffectiveType = 128LongLongEffectiveType = 256NullEffectiveType = 65536The semantic effective type of the comparison operation is
VBNullType.SingleEffectiveType = 512StringComparisonBinary = 16384A string comparison is made in a case-sensitive manner by comparing the byte values of each string.
StringComparisonText = 32768A string comparison is made in a case-insentive manner according to the platform's host-defined regional settings.
StringEffectiveType = 8192The semantic effective type of the comparison operation is
VBStringType.