From 5a5a14be5e2683a42906da4b2ad19690e230c871 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 15:15:20 +0000 Subject: feat(codegen): short-circuit AND and OR Co-Authored-By: Claude Sonnet 5.5 --- doc/language/keyword/cpsc-keyword-and.7.md | 2 +- doc/language/keyword/cpsc-keyword-or.7.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/language/keyword/cpsc-keyword-and.7.md b/doc/language/keyword/cpsc-keyword-and.7.md index 7da90b7..52b0a9a 100644 --- a/doc/language/keyword/cpsc-keyword-and.7.md +++ b/doc/language/keyword/cpsc-keyword-and.7.md @@ -12,7 +12,7 @@ left AND right # DESCRIPTION -Return BOOLEAN: true when both operands are true. Both operands must be BOOLEAN; numbers and characters are rejected. Both operands are evaluated; AND does not short-circuit. AND binds more tightly than OR and less tightly than comparisons. Use parentheses for clarity. +Return BOOLEAN: true when both operands are true. Both operands must be BOOLEAN; numbers and characters are rejected. AND short-circuits: the right operand is evaluated only when the left one is true. AND binds more tightly than OR and less tightly than comparisons. Use parentheses for clarity. # EXAMPLE diff --git a/doc/language/keyword/cpsc-keyword-or.7.md b/doc/language/keyword/cpsc-keyword-or.7.md index 678ff19..986044e 100644 --- a/doc/language/keyword/cpsc-keyword-or.7.md +++ b/doc/language/keyword/cpsc-keyword-or.7.md @@ -12,7 +12,7 @@ left OR right # DESCRIPTION -Return BOOLEAN: true when either operand is true. Both operands must be BOOLEAN; numbers and characters are rejected. Both operands are evaluated; OR does not short-circuit. OR binds less tightly than AND and comparisons. +Return BOOLEAN: true when either operand is true. Both operands must be BOOLEAN; numbers and characters are rejected. OR short-circuits: the right operand is evaluated only when the left one is false. OR binds less tightly than AND and comparisons. # EXAMPLE -- cgit v1.3.1-4-g156e