Table of Contents

Enum ValueExpressionSemanticFlags

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

The semantic flags of an expression that yields a value: the facts of how it is bound and what it is written as.

[Flags]
public enum ValueExpressionSemanticFlags

Fields

AssignmentTarget = 256

What it names is written to: it is the target of an assignment, the counter or control variable of a loop, the string a Mid statement replaces a part of, or the array a ReDim gives its dimensions. An element of an array is written through the array, which is what is flagged.

CaseMismatch = 64

The name is written in a different case than the declaration it refers to.

DefaultMember = 4

It indexes an object, which is a call of the default member of its class: c(1) is c.Item(1).

DictionaryAccess = 16

It is a dictionary access, owner!Member: a call of the default member of the owner with the name of the member as its argument.

EmptyLetToArray = 32768

It is the Empty or the Null literal, Let-assigned to an array: a variable, or the result of a function, declared as one. Its declared type is Variant (MS-VBAL §3.3.5.2), which is valid to Let-coerce to an array; the value it holds raises run-time error 13 (Type mismatch) whenever it runs, as MS-VBA has it.

ExplicitCallKeyword = 128

It is the callee of a Call statement written with the Call keyword (IsExplicitCall), the obsolete form of the statement.

IgnoredTypeCharacter = 8192

It is a name of a reserved function of the library written with a type character that does not match the function's declared type (Len$, CVar$, Abs%): MS-VBAL §5.6.10 makes the name invalid, and MS-VBA ignores the character.

IsMissingAlwaysFalse = 65536

A call of IsMissing (MS-VBAL §6.1.2.7.1.6) of a parameter that can never be missing, so that the call is always False: a parameter that is not a Variant, which an omitted argument does not leave missing, or an Optional Variant with a default value, which an omitted argument gives that value. A Variant parameter with no default can be missing, required or not (an omitted argument passed on to it), and so can a ParamArray with no elements, as MS-VBA has it.

LateBound = 2

The member it names is not one its owner's declared type says it has, and is bound when the expression runs: the owner is a Variant or an Object.

Literal = 1

The expression is a literal: its value is what is written.

OverflowsWhereVariantWidens = 4096

It is an addition, a subtraction or a multiplication of Byte, Integer or Long values, one of which is Abs, Int or Fix of a number: MS-VBA types that call as the number's type, and the operation overflows (error 6) where MS-VBAL, which declares the call As Variant, has a Variant operation widen to a larger type (ArgumentTypedFunctions).

PassedAsArgument = 512

It is an argument of a call that may take it by reference: what the procedure does with it, reads it or writes to it, is not what the expression says. An argument that is passed by value, and an index of an array, is not.

ProcedureCall = 32

It invokes a procedure, however it is written: a name with no argument list, or an index expression on a procedure.

RedundantByVal = 1024

It is an argument written with ByVal for a parameter that is ByVal already: the keyword changes nothing. MS-VBA compiles it, where MS-VBAL §5.6.13.1 refuses it (RD-VBAL §5.6.13.1).

SetHasNoDefaultMemberToSet = 2048

It is a call of a function, or of a property that has no Property Set, named as the target of a Set statement outside its own body, of a class whose default member has no Property Set: what it returns has nothing to Set, and the Set raises run-time error 438 (Object doesn't support this property or method) whenever it runs. MS-VBA compiles it (MS-VBAL §5.4.3.9).

A call of a type that is neither an object nor a Variant is a compile error as the target of a Set already; one of an Object or a Variant fails or not by the value it returns, which only an evaluation of it can tell.

ValueOfObjectWithNoDefaultMember = 16384

It is an object of a class that has no default member, where a value is expected: the value of a Let assignment, an operand of an operator other than Is, an argument of a parameter declared with a value type. MS-VBAL §5.5.1.1 makes it statically invalid; MS-VBA compiles it, and raises run-time error 438 (Object doesn't support this property or method) whenever it runs, or 91 when the object is Nothing.

WithBlockRelative = 8

It is written relative to the object of an enclosing With block: .Member or !Member.