From 2a7468c5342a6ac1f0b505fed6376122b68e4d25 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sat, 9 May 2026 20:05:47 +0200 Subject: [PATCH 1/4] Remove the empty todo file. --- docs/Reference/Core/todo.md | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 docs/Reference/Core/todo.md diff --git a/docs/Reference/Core/todo.md b/docs/Reference/Core/todo.md deleted file mode 100644 index a1e5c9c..0000000 --- a/docs/Reference/Core/todo.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: TODO List for /tb/Core -nav_exclude: true ---- - -> [!NOTE] -> -> All entries in `/tB/Core/` are now documented; this stub is retained as a place to add new entries. \ No newline at end of file From dc3dc1ce2b4e04ade6a47faf70e6b53f6f2683d2 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sat, 9 May 2026 20:01:09 +0200 Subject: [PATCH 2/4] Add missing links from Procedures and Functions. --- docs/Reference/Procedures and Functions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Reference/Procedures and Functions.md b/docs/Reference/Procedures and Functions.md index e19076c..f537045 100644 --- a/docs/Reference/Procedures and Functions.md +++ b/docs/Reference/Procedures and Functions.md @@ -159,7 +159,7 @@ permalink: /Reference/Procedures-and-Functions - [LCase$, LCase](../tB/Modules/Strings/LCase) -- returns a string converted to lowercase - [Left$, Left, LeftB$, LeftB](../tB/Modules/Strings/Left) -- returns the leftmost characters from a string - [Len, LenB](../tB/Modules/Strings/Len) -- returns the length of a string, or the storage size of a variable -- Load +- [Load](../tB/Core/Load) -- loads an object (typically a form) into memory without showing it - [Loc](../tB/Modules/FileSystem/Loc) -- returns the current read/write position within an open file - [LOF](../tB/Modules/FileSystem/LOF) -- returns the size, in bytes, of an open file - [Log](../tB/Modules/Math/Log) -- returns the natural (base *e*) logarithm of a number @@ -178,7 +178,7 @@ permalink: /Reference/Procedures-and-Functions ## N -- Name +- [Name](../tB/Core/Name) -- renames a disk file, directory, or folder - [NPer](../tB/Modules/Financial/NPer) -- returns the number of periods for an annuity based on periodic fixed payments and a fixed interest rate - [NPV](../tB/Modules/Financial/NPV) -- returns the net present value of an investment based on a series of periodic cash flows and a discount rate - [Now](../tB/Core/Now) -- returns the current system date and time @@ -229,7 +229,7 @@ permalink: /Reference/Procedures-and-Functions ## S -- SavePicture +- [SavePicture](../tB/Core/SavePicture) -- saves a graphic from a **Picture** or **Image** to a file - [SaveSetting](../tB/Modules/Interaction/SaveSetting) -- saves or creates an application entry in the application’s entry in the Windows registry - [Second](../tB/Modules/DateTime/Second) -- returns the second of the minute from a time value - [Seek](../tB/Modules/FileSystem/Seek) -- returns or sets the read/write position within an open file @@ -266,7 +266,7 @@ permalink: /Reference/Procedures-and-Functions - [UBound](../tB/Modules/Information/UBound) -- returns the largest valid subscript for a dimension of an array - [UCase$, UCase](../tB/Modules/Strings/UCase) -- returns a string converted to uppercase -- Unload +- [Unload](../tB/Core/Unload) -- removes an object (typically a form) from memory ## V From b4eef8cdfbd0fcb6fa43fa50dc8faf2b33a2bfe4 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sat, 9 May 2026 20:16:27 +0200 Subject: [PATCH 3/4] Array is already documented, fix the links and remove the todo. --- docs/Reference/Core/Option.md | 2 +- docs/Reference/Modules/HiddenModule/Array.md | 2 ++ docs/Reference/Modules/Information/LBound.md | 2 +- docs/Reference/Modules/VBA-todo.md | 11 ----------- 4 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 docs/Reference/Modules/VBA-todo.md diff --git a/docs/Reference/Core/Option.md b/docs/Reference/Core/Option.md index f558272..5dd6a16 100644 --- a/docs/Reference/Core/Option.md +++ b/docs/Reference/Core/Option.md @@ -23,7 +23,7 @@ Because the default base is **0**, the **Option Base** statement is never requir If used, the statement must appear in a [module](../Gloss#module) or [class](../Gloss#class) before any procedures, functions, or properties. **Option Base** can appear only once in a module and must precede array [declarations](../Gloss#declaration) that include dimensions. > [!NOTE] -> The **To** clause in the [**Dim**](Dim), [**Private**](Private), [**Public**](Public), [**ReDim**](ReDim), and [**Static**](Static) statements provides a more flexible way to control the range of an array's subscripts. However, if you don't explicitly set the lower bound with a **To** clause, you can use **Option Base** to change the default lower bound to 1. The base of an array created with the [**ParamArray**](ParamArray) keyword is zero; **Option Base** does not affect [**ParamArray**](ParamArray) (or the [**Array**](../Modules/VBA/Array) function, when qualified with the name of its type library, for example [**VBA.Array**](../Modules/VBA/Array)). +> The **To** clause in the [**Dim**](Dim), [**Private**](Private), [**Public**](Public), [**ReDim**](ReDim), and [**Static**](Static) statements provides a more flexible way to control the range of an array's subscripts. However, if you don't explicitly set the lower bound with a **To** clause, you can use **Option Base** to change the default lower bound to 1. The base of an array created with the [**ParamArray**](ParamArray) keyword is zero; **Option Base** does not affect [**ParamArray**](ParamArray) (or the [**Array**](../../tB/Core/Array) function). The **Option Base** statement only affects the lower bound of arrays in the module where the statement is located. diff --git a/docs/Reference/Modules/HiddenModule/Array.md b/docs/Reference/Modules/HiddenModule/Array.md index 6e5b938..7698c12 100644 --- a/docs/Reference/Modules/HiddenModule/Array.md +++ b/docs/Reference/Modules/HiddenModule/Array.md @@ -2,6 +2,8 @@ title: Array parent: (Default) Module permalink: /tB/Modules/HiddenModule/Array +redirect_from: + - /tB/Core/Array --- # Array {: .no_toc } diff --git a/docs/Reference/Modules/Information/LBound.md b/docs/Reference/Modules/Information/LBound.md index 0a4c597..5f06666 100644 --- a/docs/Reference/Modules/Information/LBound.md +++ b/docs/Reference/Modules/Information/LBound.md @@ -28,7 +28,7 @@ For an array `Dim A(1 To 100, 0 To 3, -3 To 4)`, **LBound** returns: | `LBound(A, 2)` | 0 | | `LBound(A, 3)` | -3 | -The default lower bound for any dimension is either 0 or 1, depending on the **Option Base** setting. Arrays created with the [**Array**](../VBA/Array) function are zero-based regardless of **Option Base**. Arrays whose dimensions are set with the **To** clause in **Dim**, **Private**, **Public**, **ReDim**, or **Static** can have any integer lower bound. +The default lower bound for any dimension is either 0 or 1, depending on the **Option Base** setting. Arrays created with the [**Array**](../../Core/Array) function are zero-based regardless of **Option Base**. Arrays whose dimensions are set with the **To** clause in **Dim**, **Private**, **Public**, **ReDim**, or **Static** can have any integer lower bound. ### Example diff --git a/docs/Reference/Modules/VBA-todo.md b/docs/Reference/Modules/VBA-todo.md deleted file mode 100644 index 04c4345..0000000 --- a/docs/Reference/Modules/VBA-todo.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: TODO List for /tB/Modules/VBA -nav_exclude: true -redirect_from: - - /tB/Modules/VBA/Array ---- - -> [!WARNING] -> -> Pardon, we have not documented this statement or procedure yet. - From 3178a1e1d04a0257ed298c4524e630a7e9c3eec5 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sat, 9 May 2026 20:20:52 +0200 Subject: [PATCH 4/4] Fix: Implements supports multiple arguments. --- docs/Reference/Core/Implements.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/Reference/Core/Implements.md b/docs/Reference/Core/Implements.md index 63266aa..26d048f 100644 --- a/docs/Reference/Core/Implements.md +++ b/docs/Reference/Core/Implements.md @@ -9,7 +9,7 @@ permalink: /tB/Core/Implements Specifies an interface or class that will be implemented in the [class](Class) in which it appears. Syntax: -> **Implements** *InterfaceName* \| *ClassName* +> **Implements** { *InterfaceName* \| *ClassName* } [ **,** { *InterfaceName* \| *ClassName* } ]… *InterfaceName* : The name of an interface — either an [**Interface**](Interface) block defined in twinBASIC, or an interface in a referenced type library — whose members will be implemented by the corresponding members in the class. @@ -17,6 +17,8 @@ Syntax: *ClassName* : The name of a class whose default interface will be implemented. +A single **Implements** statement can list several interfaces or classes separated by commas; this is equivalent to writing one **Implements** statement per name. Classic VBA requires a separate statement for each. + An *interface* is a collection of prototypes representing the members (methods and properties) that the interface encapsulates; that is, it contains only the declarations for the member procedures. A *class* provides an implementation of all the methods and properties of one or more interfaces. Classes provide the code used when each function is called by a controller of the class. All classes implement at least one interface, which is considered the default interface of the class. Any member that isn't explicitly a member of an implemented interface is implicitly a member of the default interface. When a class implements an interface, the class provides its own versions of all the **Public** procedures specified in the interface. In addition to providing a mapping between the interface prototypes and your procedures, the **Implements** statement causes the class to accept COM `QueryInterface` calls for the specified interface ID. @@ -29,6 +31,7 @@ The **Implements** statement can't appear in a standard module — it is valid o twinBASIC extends classic VBA's **Implements** in several ways. See [Inheritance](../../Features/Language/Inheritance) for the full discussion; the headline differences: +- **Comma-separated list** — one **Implements** statement can name multiple interfaces or classes, e.g. `Implements IFoo, IBar, IBaz`. Classic VBA requires a separate **Implements** statement for each. - **Inherited interfaces** — `Implements` works directly on a derived interface (e.g. `Implements IFoo2` where `Interface IFoo2 Extends IFoo`). The class need not name `IFoo` separately; `QueryInterface` for the base is satisfied automatically. Classic VBA does not support implementing derived interfaces. - **Multiple-implementation form** — a single member can implement methods on several interfaces at once via `Implements ., ., …` after the procedure header. This is useful when several interfaces declare the same member and you want one body to satisfy all of them. - **`As Any` parameters** — interfaces declared with `As Any` parameters can be implemented (substituting `As LongPtr` for `As Any` in the implementing class). Classic VBA rejects this.