Re: Wide Character Problem in Ada.Numerics
- From: Adam Beneschan <adam@xxxxxxxxxx>
- Date: 27 Apr 2007 08:41:17 -0700
On Apr 27, 5:08 am, Jean-Pierre Rosen <r...@xxxxxxxxx> wrote:
Adam Beneschan a écrit :
On Apr 25, 5:27 pm, Brian May <b...@xxxxxxxxxxxxxxxxxxx> wrote:
>> Wait a minute... are you saying that in GNAT, you cannot WITH a"Jean-Pierre" == Jean-Pierre Rosen <r...@xxxxxxxxx> writes:
>> 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
.
- Follow-Ups:
- Re: Wide Character Problem in Ada.Numerics
- From: Ray Blaak
- Re: Wide Character Problem in Ada.Numerics
- References:
- Wide Character Problem in Ada.Numerics
- From: david . smith
- Re: Wide Character Problem in Ada.Numerics
- From: Martin Krischik
- Re: Wide Character Problem in Ada.Numerics
- From: Jean-Pierre Rosen
- Re: Wide Character Problem in Ada.Numerics
- From: Adam Beneschan
- Re: Wide Character Problem in Ada.Numerics
- From: Jean-Pierre Rosen
- Re: Wide Character Problem in Ada.Numerics
- From: Brian May
- Re: Wide Character Problem in Ada.Numerics
- From: Adam Beneschan
- Re: Wide Character Problem in Ada.Numerics
- From: Jean-Pierre Rosen
- Wide Character Problem in Ada.Numerics
- Prev by Date: Re: GNAT and large number of threads
- Next by Date: Re: Wide Character Problem in Ada.Numerics
- Previous by thread: Re: Wide Character Problem in Ada.Numerics
- Next by thread: Re: Wide Character Problem in Ada.Numerics
- Index(es):
Relevant Pages
|
Loading