From 90fc80c193453e8d5038530f310fc007f9ff9789 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 23 Oct 2026 01:19:28 +0000 Subject: fix(stdlib)!: return CHAR from CHR BREAKING CHANGE: CHR now returns CHAR instead of STRING, so user overloads and templates select or deduce CHAR for CHR(...). Co-Authored-By: Claude Opus 5.5 --- tests/i/string-values/notes.md | 2 +- tests/library/exp-string/notes.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/i/string-values/notes.md b/tests/i/string-values/notes.md index 1e821cc..0e4be24 100644 --- a/tests/i/string-values/notes.md +++ b/tests/i/string-values/notes.md @@ -2,4 +2,4 @@ Human review: pending. Expected output is traced from independent string values. -Record copies and BYVAL array calls must preserve the source when a copy changes. Self-assignment preserves the value. Global and constant strings remain available to functions. Comparisons use case-sensitive content ordering. Ordinary literals retain the legacy NUL truncation; CHR can construct an owning one-byte NUL string. +Record copies and BYVAL array calls must preserve the source when a copy changes. Self-assignment preserves the value. Global and constant strings remain available to functions. Comparisons use case-sensitive content ordering. Ordinary literals retain the legacy NUL truncation; CHR(0) returns a NUL CHAR that converts to a one-byte NUL string. diff --git a/tests/library/exp-string/notes.md b/tests/library/exp-string/notes.md index e2a1bbc..50080be 100644 --- a/tests/library/exp-string/notes.md +++ b/tests/library/exp-string/notes.md @@ -18,6 +18,6 @@ UCASE converts AbC@19 to ABC@19 without modifying the source. Its CHAR overload ASC returns 65 for CHAR A and the first byte of ABCDEFGH, zero for empty strings or NUL, and 255 for a byte with all eight bits set. These byte-code functions are compiler/library extensions. -CHR codes 65 and 90 concatenate to AZ; converting A to a code and back preserves 65. Code zero produces one retained NUL byte. Taking the low eight bits gives 65 for 321 and 255 for -1. +CHR codes 65 and 90 concatenate to AZ; converting A to a code and back preserves 65. CHR returns CHAR; code zero produces a NUL CHAR whose STRING conversion retains one byte. Taking the low eight bits gives 65 for 321 and 255 for -1. IS_NUM accepts 12.5 and a leading space before 12.5. It rejects trailing junk, empty input, trailing space, whitespace alone, and a NUL byte before or after a valid number, without throwing. Numeric recognition follows the compiler's strtod-based extension. -- cgit v1.3.1-4-g156e