VHDL Issue Number: 0252 Classification: Language Definition Problem Language Version: VHDL-87 Summary: Short-circuit operators don't when called as functions Related Issues: Superseded By IR 1054 (Andy Tsay) Relevant LRM Sections: 7.2, 7.2.1, 7.3.3 Key Words and Phrases: Short-circuit operators, expressions, function calls Current Status: Submitted 1076-1993 Disposition: Superseded (ISAC Issues Outstanding) Disposition Rationale: N/A Superseded By: 1054 ----------------------- Date Submitted: 1992/03/06 Author of Submission: Paul Menchini Author's Affiliation: CAD Language Systems, Inc. Author's Post Address: 2 Davis Drive P.O. Box 13036 Research Triangle Park, NC 27709-3036 Author's Phone Number: (919) 990-9506 Author's Fax Number: Author's Net Address: mench@clsi.com ----------------------- Date Analyzed: TBD Author of Analysis: TBD Revision Number: $Revision: 1.10 $ Date Last Revised: $Date: 1995/08/04 01:45:13 $ Description of Problem ---------------------- Consider the following two expressions: 1. a and b 2. "and" (a, b) These two expressions do not have identical semantics if the operator in expression 1 and the operator denoted by the prefix in expression 2 denote the same short-circuit operator. Specifically, in expression 1, if the value of a is sufficient to determine the entire expression's value, b is never evaluated. In contrast, in expression 2, b is always evaluated. The LRM is clear on this point. The first sentence of the last paragraph of Section 7.3.3 states (in part): Evaluation of a function call includes evaluation of the actual parameter expressions specified in the call .... No exception is made for function names that denote short-circuit operators. Proposed Resolution ------------------- Rework the language of the final paragraph of Section 7.3.3 to allow short- circuit operators called as functions to evaluate their second argument only as necessary to determine the value to be returned by the call. VASG-ISAC Analysis & Rationale ------------------------------ TBD VASG-ISAC Recommendation for IEEE Std 1076-1987 ----------------------------------------------- TBD VASG-ISAC Recommendation for Future Revisions --------------------------------------------- TBD