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,182c0df39337eeca X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!t39g2000prd.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Wide Character Problem in Ada.Numerics Date: 27 Apr 2007 08:41:17 -0700 Organization: http://groups.google.com Message-ID: <1177688477.802262.165950@t39g2000prd.googlegroups.com> References: <1177363740.965003.247270@l77g2000hsb.googlegroups.com> <462daae8$1@news.post.ch> <1177432510.964311.114370@r3g2000prh.googlegroups.com> <1177609437.376996.161050@n35g2000prd.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1177688485 11537 127.0.0.1 (27 Apr 2007 15:41:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 27 Apr 2007 15:41:25 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: t39g2000prd.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news1.google.com comp.lang.ada:15358 Date: 2007-04-27T08:41:17-07:00 List-Id: On Apr 27, 5:08 am, Jean-Pierre Rosen wrote: > Adam Beneschan a =E9crit : > > > On Apr 25, 5:27 pm, Brian May wrote: > >>>>>>> "Jean-Pierre" =3D=3D Jean-Pierre Rosen writes: > >> >> Wait a minute... are you saying that in GNAT, you cannot WITH a > >> >> package unless the source of the WITH'ed package uses the same > >> >> encoding as the source of the package doing the WITH'ing? > >> >> Ouch. This somehow seems to run counter to the whole > >> >> philosophy of abstraction that packages are supposed to > >> >> provide. > > >> How do you expect the compiler to know what encoding is used for each > >> source file? I think it could only know if the file was compiled > >> first. > > > Well, the original example had a problem with a language-defined > > package that was WITH'ed. So surely that file must have been compiled > > first? By *somebody*??? I hope they're not releasing runtime > > packages that they've never compiled!!!!!! > > I think you missed the point about the source model used by Gnat. A > specification never needs to be compiled (unless it is a bodyless > package). It is really treated like a #include: it is read everytime you > "with" the package. Even so, I believe that I'd want to compile a specification that I wrote before trying to WITH it, just to make sure there are no errors. This wouldn't apply to a specification that's part of someone else's distribution (either the GNAT runtime, or some other Ada software downloaded from the web). Now, I might not feel a need to compile a specification myself since I could trust that someone else already did that and made it work. But I presume that whoever wrote the software compiled the spec themselves (or it was "compiled" when it was WITH'ed into some other package), and at that point the compiler would have been told what the source encoding was---and that information, about the source encoding, should somehow be saved and included in the distribution, so that it's available to the compiler when other users who download the distribution WITH its packages. At least that's the way I'd do it. -- Adam