# VBA Package

The VBA built-in package collects the standard runtime library --- the modules grouping the standalone procedures (**MsgBox**, **CStr**, **Mid**, **Format**, …), plus a small number of intrinsic classes (**Collection**, **Err**) and twinBASIC's runtime expression engine.

## Classes

- [Collection](/tB/Modules/Collection/index.md) -- ordered set of values or object references, accessed by 1-based index or by optional string key
- [ErrObject](/tB/Modules/ErrObject/index.md) -- the singleton **Err** object holding information about the most recent run-time error
- [Debug](/tB/Modules/Debug.md) -- the intrinsic debugging object: **Print**, **TracePrint**, **Cls** and **Assert**
- [TbExpressionService](/tB/Modules/TbExpressionService/index.md) -- runtime expression engine -- parse and evaluate twinBASIC-syntax expressions supplied as strings

## Modules

- [(Default)](/tB/Modules/HiddenModule/index.md) -- unqualified low-level intrinsics -- the **GetMem** / **PutMem** family, **AllocMem**, atomic operations, compile-time reflection, codegen and stack-inspection primitives, …
- [Compilation](/tB/Modules/Compilation/index.md) -- compile-time intrinsics that record the project, component, procedure, and source file at the call site
- [Constants](/tB/Modules/Constants/index.md) -- global character, pointer, and error-base constants reachable without qualification (**vbCrLf**, **vbNullString**, **vbObjectError**, …)
- [Conversion](/tB/Modules/Conversion/index.md) -- type coercion (**CBool**, **CDate**, **CType**, …), number ↔ string parsing, base conversion, and **Variant**-with-error construction
- [DateTime](/tB/Modules/DateTime/index.md) -- reading the system clock, building **Date** values from components, parsing them out of strings, and shifting them by chosen units
- [FileSystem](/tB/Modules/FileSystem/index.md) -- pathname-based and file-number-based operations on files and directories
- [Financial](/tB/Modules/Financial/index.md) -- annuity calculations, internal-rate-of-return analysis on variable cash flows, and asset depreciation
- [Information](/tB/Modules/Information/index.md) -- **Is…** predicates, **VarType** / **TypeName**, array bounds and construction, raw pointers (**ObjPtr**, **StrPtr**, **VarPtr**), and **RGB** colour helpers
- [Interaction](/tB/Modules/Interaction/index.md) -- dialogs (**MsgBox**, **InputBox**), inline conditionals (**Choose**, **Switch**, **IIf**), process launching, registry helpers, environment, and dynamic-dispatch primitives
- [Math](/tB/Modules/Math/index.md) -- sign and magnitude, trigonometry, exponentials and logarithms, the square root, rounding, and pseudo-random numbers
- [Strings](/tB/Modules/Strings/index.md) -- measuring, searching, slicing, padding, joining, splitting, and formatting **String** values

> [!NOTE]
>
> The modules listed above are used for grouping documentation, they don't always match exactly with the implementation details of the VBA package.
