Defect Report concerning: IEEE Std. 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities
Clause: 4.22
PASC Interpretation Ref: pasc-1003.2-54
Topic: expr


This is an unapproved interpretation of PASC 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities.

Use of the information contained in this unapproved document is at your own risk.

Last update: 20 April,2001


								1003.2-92  #54

 _____________________________________________________________________________

	Interpretation Number:	XXXX
	Topic:			expr
	Relevant Sections:	4.22
	Classification:	 Ambiguous 


Interpretation Request: (Defect Report)
-----------------------


I request an interpretation of 1003.2-1992 for section 4.22 expr.

If no operands are provided, i.e. there is no expression, then is the
expression invalid?

Some argue that no expression is tantamount to an invalid expression
(exit status 2).  Others argue that no expression falls under "an
error occurred" (exit status >2).  What is the correct interpretation
of the standard or are both interpretations correct?

[Note: I have seen both exit status 2 and 3 from different
 implementations of expr].


(Keith Stobie)


IEEE Interpretation for 1003.2-1992 
-----------------------------------
The standard is unclear on this issue, and no conformance
distinction can be made between alternative implementations
based on this. 

The standard specifies how expr should act if given one or
more operands, the standard does not address the issue when no
operands are given.

Concerns about the wording of this part of the standard have
been forwarded to the sponsor.
      

Rationale for Interpretation:
-----------------------------

None
 _____________________________________________________________________________