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 --- AGENTS/PITFALLS/core-language.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'AGENTS') diff --git a/AGENTS/PITFALLS/core-language.md b/AGENTS/PITFALLS/core-language.md index dd222c7..5ff97ca 100644 --- a/AGENTS/PITFALLS/core-language.md +++ b/AGENTS/PITFALLS/core-language.md @@ -31,7 +31,7 @@ source, most also by compiling and running test programs. annotate `BYVAL` explicitly. - **`/` always yields REAL** (double FDiv), even for two INTEGERs; integer division is DIV/MOD only. - - CHR returns an owning one-byte STRING, not CHAR; CHR(0) retains one NUL byte. + - CHR returns CHAR, not STRING; CHR(0) is a NUL CHAR that converts to a one-byte STRING. - STR_TO_NUM always returns REAL and shares parseNumber (strtod, full consumption, overflow rejected) with IS_NUM. - NUM_TO_STR keeps the full signed i64 range for INTEGER; REAL uses the shortest round-trip text (realText in string.cc), byte-identical to OUTPUT's IR helper in -- cgit v1.3.1-4-g156e