From b26f7e178ea8cc20c6991f82498054e2d3da5a34 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sun, 13 Sep 2026 12:37:19 +0200 Subject: [PATCH 1/6] TB-0186: Remove stale LongLong 64-bit-only claim from Declare.md --- docs/Reference/Core/Declare.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Reference/Core/Declare.md b/docs/Reference/Core/Declare.md index 85fb2ab5..d0479e12 100644 --- a/docs/Reference/Core/Declare.md +++ b/docs/Reference/Core/Declare.md @@ -70,7 +70,7 @@ Syntax: : *optional* List of variables representing arguments that are passed to the procedure when it is called. *type* -: *optional* Data type of the value returned by a **Function** procedure; may be Byte, Boolean, Integer, Long, LongLong, LongPtr, Currency, Single, Double, Decimal, Date, String (variable length only), Variant, a user-defined type (UDT), or an object type. **LongLong** is a valid declared type only on 64-bit platforms. +: *optional* Data type of the value returned by a **Function** procedure; may be Byte, Boolean, Integer, Long, LongLong, LongPtr, Currency, Single, Double, Decimal, Date, String (variable length only), Variant, a user-defined type (UDT), or an object type. ### arglist @@ -97,7 +97,7 @@ Syntax: [ **Optional** ] [ **ByVal** \| **ByRef** ] [ **ParamArray** ] *varname* : Required for array variables. Indicates that *varname* is an array. *type* -: *optional* Data type of the argument passed to the procedure; may be **Byte**, **Boolean**, **Integer**, **Long**, **LongLong**, **LongPtr**, **Currency**, **Single**, **Double**, **Decimal**, **Date**, **String** (variable length only), **Object**, **Variant**, a user-defined type (UDT), or an object type. (**LongLong** is a valid declared type only on 64-bit platforms.) +: *optional* Data type of the argument passed to the procedure; may be **Byte**, **Boolean**, **Integer**, **Long**, **LongLong**, **LongPtr**, **Currency**, **Single**, **Double**, **Decimal**, **Date**, **String** (variable length only), **Object**, **Variant**, a user-defined type (UDT), or an object type. When an argument list is included, the number and type of arguments are checked each time the procedure is called. The First sub in the following example takes one **Long** argument, whereas the Second sub takes no arguments: From 01dbb6d92d84d9e8d5a6b3fb86d89827e8fddfac Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sun, 13 Sep 2026 12:40:14 +0200 Subject: [PATCH 2/6] TB-0177: Fix _App LastBuildPath and ModulePath doc claims --- .../Built-In/AppGlobalClassObject/_App/LastBuildPath.md | 2 +- docs/Reference/Built-In/AppGlobalClassObject/_App/ModulePath.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Reference/Built-In/AppGlobalClassObject/_App/LastBuildPath.md b/docs/Reference/Built-In/AppGlobalClassObject/_App/LastBuildPath.md index eb8a69ac..bc565c49 100644 --- a/docs/Reference/Built-In/AppGlobalClassObject/_App/LastBuildPath.md +++ b/docs/Reference/Built-In/AppGlobalClassObject/_App/LastBuildPath.md @@ -19,7 +19,7 @@ Syntax: *object*.**LastBuildPath** > [!NOTE] > -> **LastBuildPath** is a twinBASIC-specific property with no equivalent in VBA or VB6. It is only meaningful during IDE-hosted execution; in a compiled executable it returns the path of that executable. +> **LastBuildPath** is a twinBASIC-specific property with no equivalent in VBA or VB6. It is only meaningful during IDE-hosted execution; in a compiled executable it returns an empty string. ### Example diff --git a/docs/Reference/Built-In/AppGlobalClassObject/_App/ModulePath.md b/docs/Reference/Built-In/AppGlobalClassObject/_App/ModulePath.md index ad0dcac2..6c546ebf 100644 --- a/docs/Reference/Built-In/AppGlobalClassObject/_App/ModulePath.md +++ b/docs/Reference/Built-In/AppGlobalClassObject/_App/ModulePath.md @@ -15,7 +15,7 @@ Syntax: *object*.**ModulePath** *object* : *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object. -**ModulePath** returns the path to the source file or compiled module that is currently executing. When running inside the twinBASIC IDE, this is the path to the `.twin` source file. In a compiled executable, it is the path to the executable or DLL. +**ModulePath** returns the full path of the binary module that is currently executing. In a compiled executable, this is the path to the executable or DLL. When running inside the twinBASIC IDE, the twinBASIC debugger DLL path is returned. > [!NOTE] > From 5decdb31855d6eabcb4d86ab8710cbbdf4b266db Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sun, 13 Sep 2026 12:41:52 +0200 Subject: [PATCH 3/6] TB-0180: Clarify IntegerDivide operand rounding vs result truncation --- docs/Reference/Core/IntegerDivide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Reference/Core/IntegerDivide.md b/docs/Reference/Core/IntegerDivide.md index 7a812d23..a0440380 100644 --- a/docs/Reference/Core/IntegerDivide.md +++ b/docs/Reference/Core/IntegerDivide.md @@ -27,13 +27,13 @@ Before division is performed, the numeric expressions are rounded to **Byte**, * Usually, the data type of *result* is a **Byte**, **Byte** variant, **Integer**, **Integer** variant, **Long**, **Long** variant, or **LongLong**, regardless of whether *result* is a whole number. -Any fractional portion is truncated. However, if any expression is **Null**, *result* is **Null**. Any expression that is **Empty** is treated as 0. +Any fractional portion of the quotient is discarded. However, if any expression is **Null**, *result* is **Null**. Any expression that is **Empty** is treated as 0. Dividing by zero raises a run-time error. ### Compound assignment -`x \= y` is the twinBASIC shorthand for `x = x \ y`. The left-hand side is evaluated once and rounded to an integral type as described above. **\\=** is a statement, not an expression --- it does not produce a value. +`x \= y` is the twinBASIC shorthand for `x = x \ y`. The left-hand side is evaluated once and rounded to an integral type before the division. **\\=** is a statement, not an expression --- it does not produce a value. ```tb Dim Value As Long = 100 From 020497d9ef09a93649616df59adc123ed81777fb Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sun, 13 Sep 2026 12:45:38 +0200 Subject: [PATCH 4/6] TB-0179: Fix Divide.md result-type table and div-by-zero claim --- docs/Reference/Core/Divide.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/Reference/Core/Divide.md b/docs/Reference/Core/Divide.md index 2db4349a..a0108d5b 100644 --- a/docs/Reference/Core/Divide.md +++ b/docs/Reference/Core/Divide.md @@ -27,12 +27,11 @@ The data type of *result* is usually a **Double** or a **Double** variant. The f | If | Then *result* is | |:----------------------------------------------------------------|:---------------------------------------------------------------------------------------| -| Both expressions are **Byte**, **Integer**, or **Single** | A **Single** unless it overflows its legal range, in which case an error occurs. | -| Both expressions are **Byte**, **Integer**, or **Single** variants | A **Single** variant unless it overflows its legal range, in which case *result* is a **Variant** containing a **Double**. | +| At least one expression is **Single** and neither is **Long** | A **Single** unless it overflows its legal range, in which case an error occurs. | +| One or both expressions are **Null** | **Null**. | +| An expression is **Empty** | Treated as 0. | -If one or both expressions are **Null** expressions, *result* is **Null**. Any expression that is **Empty** is treated as 0. - -Dividing by zero is an error for integral types; for **Single** and **Double** it follows the IEEE-754 rules (positive infinity, negative infinity, or NaN). Use [**\\**](IntegerDivide) for truncating-integer division and [**Mod**](Mod) for remainder. +Dividing by zero raises a run-time error. Use [**\\**](IntegerDivide) for truncating-integer division and [**Mod**](Mod) for remainder. ### Compound assignment From 93ac6c3d5ff1f93ddaffdf38c057c3f481288680 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sun, 13 Sep 2026 12:47:18 +0200 Subject: [PATCH 5/6] TB-0174: CurrentSourceFile returns leaf name, not absolute path --- docs/Reference/Default/VBA/Compilation/CurrentSourceFile.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Reference/Default/VBA/Compilation/CurrentSourceFile.md b/docs/Reference/Default/VBA/Compilation/CurrentSourceFile.md index eaa9811b..bf888bbf 100644 --- a/docs/Reference/Default/VBA/Compilation/CurrentSourceFile.md +++ b/docs/Reference/Default/VBA/Compilation/CurrentSourceFile.md @@ -6,14 +6,14 @@ permalink: /tB/Modules/Compilation/CurrentSourceFile # CurrentSourceFile {: .no_toc } -Returns the full path of the source file in which the function is called, as a **String**. +Returns the name of the source file in which the function is called, as a **String**. Syntax: **CurrentSourceFile** [ **()** ] -The value is the absolute path of the source file that lexically contains the call. +The value is the file name (without directory components) of the source file that lexically contains the call --- for example, `"Form1.twin"`. > [!NOTE] -> **CurrentSourceFile** is a compile-time intrinsic: the path is captured when the source is compiled. It reflects where the file lived on the build machine and may not correspond to any path that exists at run time. +> **CurrentSourceFile** is a compile-time intrinsic: the name is captured when the source is compiled and embedded as a literal in the output. ### Example From a846a0b379b3caa9cec85ccb7eb3a08c84bee63c Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Sun, 13 Sep 2026 12:48:51 +0200 Subject: [PATCH 6/6] TB-0188: Fix Parameterised New method name and link target --- docs/Reference/twinBASIC-Additions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Reference/twinBASIC-Additions.md b/docs/Reference/twinBASIC-Additions.md index 09efe5ef..005bedef 100644 --- a/docs/Reference/twinBASIC-Additions.md +++ b/docs/Reference/twinBASIC-Additions.md @@ -76,13 +76,13 @@ See [Features → Inline Initialization](../Features/Language/Inline-Initializat ### Parameterised New -`New` accepts constructor arguments when a class exposes an `_Initialize` method with matching parameters: +`New` accepts constructor arguments when a class exposes a `Sub New` with matching parameters: ```tb Dim conn As New NamedPipeClientConnection("\\.\pipe\mypipe", token) ``` -See [Features → New](../Features/GUI-Components/New). +See [Features → Classes and Modules](../Features/Advanced/Classes-and-Modules). ---