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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news3.google.com!newshub.sdsu.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!newsfeed.hanau.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: ambiguous universal_fixed_expression Date: Sat, 27 Nov 2004 20:08:48 +0100 Organization: None Message-ID: <2879069.TtGHld9loP@linux1.krischik.com> References: Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1101631122 05 18112 S1E8XvmvtfHjEmG 041128 08:38:42 X-Complaints-To: usenet-abuse@t-online.de X-ID: rG7r0eZFwefcCrK3iQ0AkE9n-+fGLt-YWah7veVLCVI7uTCduLH9km User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:6575 Date: 2004-11-27T20:08:48+01:00 List-Id: xadian wrote: > Hi > > I've got a problem with an Ada program(surprise ;D). > With this line: > > 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. > var_Ar is an array of the type sol_Ty and x is also sol_Ty. sol_Ty > definition is a decimal fixed point: > > type sol_Ty is delta 0.01 digits 18; > I never worked with duration so can anyone tell me (or link something) > what it is and why it can be missinterpreted in this case? And how i can > GENERALLY solve it?! Maybe you should try sol_Ty'( instead of sol_Ty(. The difference is subtle: the first means "interpret as" the other "convert to". the ' notiation is paricular usefull for contants like 1.0 or so. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com