IEEE Standards Interpretations for IEEE Std 1003.1™-2001 IEEE Standard for Information Technology - Portable Operating System Interface (POSIX®)
Copyright © 2006 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.
Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.
IEEE Standards Department Copyrights and Permissions 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA
Interpretation Request #18
Topic: expr invalid_opearand Relevant Sections: expr STDOUT
For expr _invalid_expression_, the standard appears to require that a newline is required to be output, even though there is no result. This is not historical practice.
In the STDOUT section Change lines 16672 (2003 Ed) to read: "The expr utility shall evaluate the expression and upon success write the result, followed by a <newline>,...."
The standard clearly states the requirements,and conforming implementations must conform to this. The CONSEQUENCE OF ERRORS section in 1.11 states that utilities may terminate prematurely if they encounter an invalid argument, therefore a conforming implementation of the expr utility need not write the result to STDOUT.
Rationale for Interpretation