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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f14288fc5fbd20fa X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: ambiguous universal_fixed_expression References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <3O5qd.1778$u81.1697@newsread3.news.pas.earthlink.net> Date: Sat, 27 Nov 2004 20:52:15 GMT NNTP-Posting-Host: 63.184.105.178 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1101588735 63.184.105.178 (Sat, 27 Nov 2004 12:52:15 PST) NNTP-Posting-Date: Sat, 27 Nov 2004 12:52:15 PST Xref: g2news1.google.com comp.lang.ada:6564 Date: 2004-11-27T20:52:15+00:00 List-Id: xadian wrote: > x := sol_Ty((var_Ar(f)*var_Ar(b))-(var_Ar(e)*var_Ar(c))/z); > -- x : sol_Ty := (f*b - e*c) / z; > > I get the following errors: > > ambiguous universal_fixed_expression > > possible interpretation as type "Standard.duration" > > possible interpretation as type "sol_Ty" defined at line 8 > The minus in the middle is highlighted after the errors. Multiplication and division of fixed-point values results in a value of Universal_Fixed (ARM 4.5.5). Addition and subtraction, on the other hand, take arguments of a specific fixed-point type and return a value of the same type. So you need to tell the compiler the type of the results of the multiplications: X := Sol_Ty (Sol_Ty'(Var_Ar (F) * Var_Ar (B) ) - Sol_Ty'(Var_Ar (E) * Var_Ar (C) ) / Z); -- Jeff Carter "Many times we're given rhymes that are quite unsingable." Monty Python and the Holy Grail 57