Table of Contents

Enum ConversionSite

Namespace
RDCore.SDK.Semantics.Facts
Assembly
RDCore.SDK.dll

Where in the code a value is let-coerced (MS-VBAL 5.5.1.2): the construct that asks for the conversion.

public enum ConversionSite

Fields

Argument = 3

An argument of a call, coerced to the declared type of the parameter.

Assignment = 2

The value of a Let assignment, coerced to the declared type of its target (MS-VBAL 5.4.3.8).

CaseTest = 8

The selector of a Select Case block and the expressions of its clauses it is compared with.

Condition = 5

The condition of an If, ElseIf, While or Do block, coerced to Boolean.

ConstantDeclaration = 15

The value of a Const declaration, coerced to the constant's declared type (MS-VBAL 5.2.3.2), or of an Enum member, coerced to Long (MS-VBAL 5.2.3.4).

ErrorNumber = 10

The error number of an Error statement, coerced to Long.

FileStatement = 12

An operand of a file statement: the file number, the record number, the value written or the line read.

JumpSelector = 9

The selector of an On ... GoTo or On ... GoSub statement, coerced to Long.

LoopBound = 7

The start, end or step of a For loop, or the counter it is compared and incremented by.

OperatorOperand = 1

An operand of an operator expression, coerced to the effective type of the operation.

PrintItem = 11

An item of a Print or Debug.Print statement.

Return = 4

The value of a function or property, coerced to its declared return type.

StringStatement = 13

An operand of a statement that edits a String: Mid, LSet and RSet.

Subscript = 6

An array subscript or the bounds of an array declaration, coerced to Long.

Unspecified = 0

The construct that asked for the conversion did not say where it is.

⚠️ Not a valid answer for a construct that coerces: seeing it in a fact means a site was not given the context it needs.

WithTarget = 14

The object expression of a With block, coerced to the default member it denotes when it is a value.

Remarks

👉 A conversion is not always an operand of an operator. Assignments, arguments, conditions, loop bounds, subscripts and Print items coerce too, and what an analyzer says about a conversion depends on which of them it is: narrowing a Double into a Long variable is not the same finding as narrowing it into a subscript. Only the construct that performs the coercion knows which it is, so it states it when it asks for the conversion (Site).