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 --- doc/language/function/cpsc-function-chr.7.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/language/function/cpsc-function-chr.7.md b/doc/language/function/cpsc-function-chr.7.md index 3ae8612..b67b0c6 100644 --- a/doc/language/function/cpsc-function-chr.7.md +++ b/doc/language/function/cpsc-function-chr.7.md @@ -7,14 +7,14 @@ cpsc-function-chr - convert a byte code to text # SYNOPSIS ```text -CHR(code : INTEGER) RETURNS STRING +CHR(code : INTEGER) RETURNS CHAR ``` # DESCRIPTION Provided by the standard string library, loaded and linked by default. -Convert the low eight bits of code to a one-byte string. The result is STRING, not CHAR, but a STRING of length 1 converts implicitly to CHAR on assignment. Use ASCII codes 1 to 127 for ordinary text; code 0 produces one NUL byte, so LENGTH(CHR(0)) is 1. +Convert the low eight bits of code to a CHAR. The result is CHAR, not STRING; a CHAR converts implicitly to STRING where a STRING is expected. Use ASCII codes 1 to 127 for ordinary text; code 0 produces one NUL byte, so LENGTH(CHR(0)) is 1. # EXAMPLE -- cgit v1.3.1-4-g156e