The following issue has been SUBMITTED. ====================================================================== https://www.austingroupbugs.net/view.php?id=1914 ====================================================================== Reported By: rillig Assigned To: ====================================================================== Project: 1003.1(2024)/Issue8 Issue ID: 1914 Category: Shell and Utilities Type: Clarification Requested Severity: Editorial Priority: normal Status: New Name: Roland Illig Organization: User Reference: Section: Issue 8, Volume 3, expr Page Number: 2916 Line Number: 97319, 97321 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2025-03-15 16:20 UTC Last Modified: 2025-03-15 16:20 UTC ====================================================================== Summary: expr: short-circuit evaluation Description: Line 97319 says: > expr1 & expr2: Returns the evaluation of expr1 if neither expression evaluates to null or zero; otherwise, returns zero.
Line 97321 says: > expr1 | expr2: Returns the evaluation of expr1 if it is neither null nor zero; otherwise, returns the evaluation of expr2 if it is not null; otherwise, zero. These sentences differ in structure even though they describe closely related operators. In particular, line 97321 sounds as if in 'expr1 | expr2', the expr2 part should only be evaluated if necessary, while line 97319 sounds like both expr1 and expr2 should always be evaluated, even if expr1 is already false. Desired Action: Align the wording of the two operators to be structurally the same, except for the trailing "otherwise zero", as that is unique to "|". ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2025-03-15 16:20 rillig New Issue ======================================================================