Enum ConversionSite
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 = 3An argument of a call, coerced to the declared type of the parameter.
Assignment = 2The value of a
Letassignment, coerced to the declared type of its target (MS-VBAL 5.4.3.8).CaseTest = 8The selector of a
Select Caseblock and the expressions of its clauses it is compared with.Condition = 5The condition of an
If,ElseIf,WhileorDoblock, coerced toBoolean.ConstantDeclaration = 15The value of a
Constdeclaration, coerced to the constant's declared type (MS-VBAL 5.2.3.2), or of anEnummember, coerced toLong(MS-VBAL 5.2.3.4).ErrorNumber = 10The error number of an
Errorstatement, coerced toLong.FileStatement = 12An operand of a file statement: the file number, the record number, the value written or the line read.
JumpSelector = 9The selector of an
On ... GoToorOn ... GoSubstatement, coerced toLong.LoopBound = 7The start, end or step of a
Forloop, or the counter it is compared and incremented by.OperatorOperand = 1An operand of an operator expression, coerced to the effective type of the operation.
PrintItem = 11An item of a
PrintorDebug.Printstatement.Return = 4The value of a function or property, coerced to its declared return type.
StringStatement = 13An operand of a statement that edits a
String:Mid,LSetandRSet.Subscript = 6An array subscript or the bounds of an array declaration, coerced to
Long.Unspecified = 0The 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 = 14The object expression of a
Withblock, 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).