From 9b2d82dadbb465de71985a8db3aa8df454579b72 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 30 Oct 2026 14:33:33 +0000 Subject: docs(types): explain implicit constructors and raw text literals Co-Authored-By: Claude Opus 5.5 --- doc/language/keyword/cpsc-keyword-constant.7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/language/keyword/cpsc-keyword-constant.7.md') diff --git a/doc/language/keyword/cpsc-keyword-constant.7.md b/doc/language/keyword/cpsc-keyword-constant.7.md index 55960c5..5f1b9ad 100644 --- a/doc/language/keyword/cpsc-keyword-constant.7.md +++ b/doc/language/keyword/cpsc-keyword-constant.7.md @@ -12,7 +12,7 @@ CONSTANT identifier = literal # DESCRIPTION -Declare a read-only value whose type is inferred from its literal: INTEGER, REAL, BOOLEAN, CHAR, STRING, or C_STRING for a literal with the C suffix. A negative integer or real literal is allowed. As required by the Cambridge guide, variables, other constants, expressions, casts, and function calls cannot initialize a CONSTANT. +Declare a read-only value whose type is inferred from its literal: INTEGER, REAL, BOOLEAN, CHAR or C_STRING. Both ordinary and C-suffixed double-quoted literals produce C_STRING; STRING contexts use its IMPLICIT constructor. A negative integer or real literal is allowed. As required by the Cambridge guide, variables, other constants, expressions, casts, and function calls cannot initialize a CONSTANT. A constant is visible from its declaration to the end of its enclosing block. A top-level constant is also available in functions and procedures defined after its declaration. Functions do not inherit constants from another function or from an enclosing statement block. -- cgit v1.3.1-4-g156e