From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=BAYES_05,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!lll-winken!ames!ucsd!orion.cf.uci.edu!oberon!ucla-cs!sm.unisys.com!sea!steve From: steve@sea.sm.unisys.com (Steven Holtsberg) Newsgroups: comp.lang.ada Subject: Re: Implicit conversion? Message-ID: <5742@sdcrdcf.sm.unisys.com> Date: 18 Mar 89 09:46:52 GMT References: <5678@sdcrdcf.sm.unisys.com> <57900090@ada-uts> <474@ajpo.sei.cmu.edu> Sender: news@sm.unisys.com Reply-To: steve@sm.unisys.com (Steven Holtsberg) Organization: Unisys Santa Monica List-Id: In article <474@ajpo.sei.cmu.edu> rracine@ajpo.sei.cmu.edu (Roger Racine) writes: >With respect to > >X := MAX_INT - MAX_INT; > >Why would it be necessary to convert MAX_INT to anything? There exists a >predefined "-" operation which takes two universal_integers and returns >universal_integer. Then one is left with > >X := 0; > >Implicit type conversion on the 0 works fine, and no errors occur. > I don't believe that an implicit type conversion can be performed on the 0. Although a similar rule is not given for implicit type conversions, the rule for explicit type conversions says that the "expression given as the operand" is evaluated and the conversion is done on the "resulting value." In this case, 0 is not an expression in this assignment statement; it is the value of the expression MAX_INT - MAX_INT, which is not a convertible universal operand. Now, I assume the intent is that the operand of an implicit type conversion must also be an expression. However, the ARM does not explicitly state this (no pun intended!). What do the experts think?