Table of Contents

Enum ConversionSemanticFlags

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

The semantic flags that can be attached to a DataTypeConversion semantic operation.

[Flags]
public enum ConversionSemanticFlags

Fields

All = Explicit | Implicit | Failed | Recursive | CTypeAvailable | Widening | Narrowing | Lossy | BankersRounding | Numeric | DateSerial | NullOperand | EmptyOperand | ErrorOperand | ObjectOperand | UnaryOperand | BinaryLeftOperand | BinaryRightOperand | UserDefinedTypeTarget | VariantTarget | ArrayTarget | ByteArrayTarget | ByteArrayOperand | LetCoerced

Combines all values.

ArrayTarget = 1048576

This conversion operation has an array destination data type (MS-VBAL 5.5.1.2.6, 5.5.1.2.7).

BankersRounding = 256

This conversion uses the Banker's Rounding algorithm.

Probably semantically equivalent to Lossy, but kept separate for clarity. Semantic analysis issues both flags.

BinaryLeftOperand = 65536

This conversion operation implicates the left-hand side (LHS) operand of a binary operator expression.

BinaryRightOperand = 131072

This conversion operation implicates the right-hand side (RHS) operand of a binary operator expression.

ByteArrayOperand = 4194304

This conversion operation implicates a Byte() operand (MS-VBAL 5.5.1.2.6).

ByteArrayTarget = 2097152

This conversion operation has a resizable Byte() destination data type (MS-VBAL 5.5.1.2.6).

👉 Issued along with ArrayTarget.

CTypeAvailable = 16

This conversion operation can be made explicit by inserting the appropriate CType data type conversion function call.

DateSerial = 1024

This conversion operation involves a DateSerial (VBDoubleValue) conversion from a VBDateValue.

EmptyOperand = 4096

This conversion operation implicates a VBEmptyValue operand.

ErrorOperand = 8192

This conversion operation implicates a VBErrorValue operand.

Explicit = 1

This conversion operation occurs via an explicit CType data type conversion function, or an explicit let-coercion operator expression.

Failed = 4

This conversion operation produces a run-time error.

Implicit = 2

This conversion operation is not written in the source: it is performed by the semantics of the operation it is an operand of.

👉 The opposite of Explicit. Combined with LetCoerced (LetCoerced | Implicit), this is the MS-VBAL let-coercion; LetCoerced | Explicit is the same coercion, requested with RD-VBAL's explicit let-coercion operator.

LetCoerced = 8388608

This conversion implicates let-coercion semantics.

👉 Says which conversion this is, not how it came about: it is issued along with either Implicit or Explicit, never instead of one.

Lossy = 128

This conversion loses precision.

Narrowing = 64

This conversion operation results in a narrower (smaller) data type.

NullOperand = 2048

This conversion operation implicates a VBNullValue operand.

Numeric = 512

This data type conversion operation evaluates to a VBNumericType.

ObjectOperand = 16384

This conversion operation implicates a VBObjectValue operand.

Recursive = 8

This conversion operation is recursive.

UnaryOperand = 32768

This conversion operation implicates the operand of a unary operator expression.

UserDefinedTypeTarget = 262144

This conversion operation has a VBUserDefinedTypeValue destination data type.

VariantTarget = 524288

This conversion operation has a VBVariantValue destination data type.

Widening = 32

This conversion operation results in a wider (larger) data type.