Table of Contents

Enum ValueDestination

Namespace
RDCore.SDK.Semantics.Static
Assembly
RDCore.SDK.dll

What a place that expects a value expects of an object, at compile time: what ObjectValueStaticSemantics checks the object it is given against (MS-VBAL §5.5.1.1, as MS-VBA compiles it).

public enum ValueDestination

Fields

AnyValue = 0

A value of whatever type it turns out to be: the argument of Abs, Int or Fix. An object whose default member returns an object is read at run time.

SimpleDataValue = 3

What a pair of parentheses makes of what it encloses (MS-VBAL §5.6.6): the simple data value, read once - an object's default member, of the type it is declared as, whether that is a value's or an object's.

An object a default member returns is that object, of its declared class (MS-VBA, recorded in Excel): parentheses around it read its own default member in turn - ((o)) of a default member that returns a Collection is the Collection's Item, which takes an argument.

StringOrVariable = 2

"Any valid string expression, or any valid variable name": the argument of Len and LenB (MS-VBAL §6.1.2.11.1.22).

A String, a Variant, a late-bound object and a record are read as a value; a value of any other declared type must be a variable, and anything else is VariableRequired: Len(5), Len(FnLong()), an object whose default member returns neither a String nor a Variant (recorded in Excel).

TypedValue = 1

A value of a declared type: a variable or a parameter of a value type, an operand, the argument of a conversion function such as CInt. An object whose default member returns an object is a type mismatch.

Remarks

Where a value is expected, an object stands for its simple data value, what its default member returns (MS-VBAL §5.5.1.2.13). The Nothing literal has none, and neither has an object whose default member takes an argument; what else is checked depends on the place.