A NOTE has been added to this issue. 
====================================================================== 
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-18 10:05 UTC
====================================================================== 
Summary:                    expr: short-circuit evaluation
====================================================================== 

---------------------------------------------------------------------- 
 (0007121) geoffclare (manager) - 2025-03-18 10:05
 https://www.austingroupbugs.net/view.php?id=1914#c7121 
---------------------------------------------------------------------- 
It is not the "otherwise zero" that is unique to "|", it is the "returns the
evaluation of expr2" part. The "&" operation never returns expr2.

Whether or not these operations short-circuit is internal implementation detail.
Since expr does not have any operations with side effects (like ++), the
application can't tell the difference.

As for the desired action, "Align the wording of the two operators to be
structurally the same", I can't see any way to do that which would result in
text I'd be happy with. For the description of "&" to have three parts like "|",
there would necessarily be duplication in two of the parts, which would be
confusing.  E.g.:<blockquote>Returns zero if expr1 is either null or zero;
otherwise, returns zero if expr2 is either null or zero; otherwise, returns the
evaluation of expr1.</blockquote>which cries out for the first two parts to be
combined. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2025-03-15 16:20 rillig         New Issue                                    
2025-03-18 10:05 geoffclare     Note Added: 0007121                          
======================================================================


  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group

Reply via email to