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,9ce095aba33fe8d0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!t-online.de!irazu.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Negative float problem Date: Wed, 02 Nov 2005 10:04:21 +0100 Organization: CERN - European Laboratory for Particle Physics Message-ID: References: <1130351574.313991.229420@g14g2000cwa.googlegroups.com> <10mspnley7gzu$.1swtj67sv0ldr$.dlg@40tude.net> <38tcpxwxfigo$.18ysjyp9ml92c$.dlg@40tude.net> <2ybc7t4au7g$.166dxwfrds1so$.dlg@40tude.net> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1130922261 12288 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Red Hat/1.7.12-1.1.3.2.SL3 X-Accept-Language: en-us, en In-Reply-To: <2ybc7t4au7g$.166dxwfrds1so$.dlg@40tude.net> Xref: g2news1.google.com comp.lang.ada:6110 Date: 2005-11-02T10:04:21+01:00 List-Id: Dmitry A. Kazakov wrote: > package A is > type Foo is ...; > end A; > ------------------- > package A.B is > X : Foo; > function "+" (Left, Right : Foo) return Foo; > end A.B; > ------------------ > with A.B; > ... > A.B.X + A.B.X -- Why this does not work? Because "+" is not directly visible. ADL would not help here, because A.B.X is of type Foo, which is defined in A, and there is no "+" defined in this package. > And now consider this: > > package A is > type Foo is ...; > function "+" (Left, Right : Foo) return Foo; > end A; > ------------------- > package A.B is > X : Foo; > function "+" (Left, Right : Foo) return Foo; > end A.B; > ------------------ > with A.B; > ... > A.B.X + A.B.X -- BOOOOM! Why BOOOOM? It still doesn't work, for the same reason. With ADL, I would expect it to call A."+". This means that some program, which is not legal without ADL, would be legal with ADL in the language. (If your point is that any language feature can seem obscure when shown in obscure examples, then I completely agree.) -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/