Table of Contents

Class StandardLibrary

Namespace
RDCore.SDK.Runtime.StdLib
Assembly
RDCore.SDK.dll

The names the standard library is known by, and how to tell its symbols from those of the workspace and of the libraries it references.

public static class StandardLibrary
Inheritance
StandardLibrary
Inherited Members

Remarks

The library's symbols are provided by the platform's language core, which reads them off the declarations that define it. What is here is what anything that meets one of those symbols needs to recognize it.

Fields

DebugObjectName

The name of the object the development environment exposes for diagnostic output.

public const string DebugObjectName = "Debug"

Field Value

string

GlobalModuleName

The name of the synthetic module every global the language environment provides hangs off.

public const string GlobalModuleName = "_Global"

Field Value

string

Remarks

A leading underscore is not a legal VBA identifier, so no source can name this module and no workspace module can collide with it. It is a standard module, so its members are promoted to the project scope and resolve unqualified, the way a standard library's members do.

It is also the parent of a global object's class. A predeclared instance is named after its class, so a class parented to the global scope would have the same Uri as its own instance, and the name would resolve to neither of them.

LibraryName

The name of the project the standard library is.

public const string LibraryName = "VBA"

Field Value

string

Remarks

It is what a project-qualified reference to the library names: VBA.Strings.LenB, VBA.LenB (MS-VBAL §5.6.12). It is the same in every dialect: VB6 loads the very same VBA library, and what it calls VB is the runtime library of its ActiveX controls. Where dialects differ, the library's members differ, and its name stays.

Methods

IsDebugObject(Symbol)

Whether symbol is the synthesized Debug object: the default instance of its Debug class, a member of the library's GlobalModuleName module. A variable or a class of the workspace named Debug is not it.

public static bool IsDebugObject(Symbol symbol)

Parameters

symbol Symbol

The symbol a name resolved to.

Returns

bool

Remarks

Debug is written only as the Debug.Print and Debug.Assert statements. MS-VBA reads any other use of the name (a value, the target of an assignment or a With block) as a syntax error.

IsLibraryMember(Symbol)

Whether symbol is a member the standard library declares: a procedure of one of its modules, or a member of one of its classes.

public static bool IsLibraryMember(Symbol symbol)

Parameters

symbol Symbol

The member.

Returns

bool

true for a member of the standard library's; false for the workspace's, or a referenced library's.

Remarks

It carries the key the library's reader stamps on what it reads (ExternalTarget), and no other library claims it as its own: a referenced library's members carry a key of their own kind, and the name of their library (Library). The library's name is stamped on a class and not on its members, which are only ever provided with the class.