comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Wide Character Problem in Ada.Numerics
Date: 27 Apr 2007 08:41:17 -0700
Date: 2007-04-27T08:41:17-07:00	[thread overview]
Message-ID: <1177688477.802262.165950@t39g2000prd.googlegroups.com> (raw)
In-Reply-To: <j4ps0f.7jt.ln@hunter.axlog.fr>

On Apr 27, 5:08 am, Jean-Pierre Rosen <r...@adalog.fr> wrote:
> Adam Beneschan a écrit :
>
> > On Apr 25, 5:27 pm, Brian May <b...@snoopy.apana.org.au> wrote:
> >>>>>>> "Jean-Pierre" == Jean-Pierre Rosen <r...@adalog.fr> 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





  reply	other threads:[~2007-04-27 15:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-23 21:29 Wide Character Problem in Ada.Numerics david.smith
     [not found] ` <462daae8$1@news.post.ch>
2007-04-24  8:03   ` Jean-Pierre Rosen
2007-04-24 16:35     ` Adam Beneschan
2007-04-25  8:28       ` Maciej Sobczak
2007-04-25  9:02       ` Jean-Pierre Rosen
2007-04-26  0:27         ` Brian May
2007-04-26 17:43           ` Adam Beneschan
2007-04-27  0:35             ` Brian May
2007-04-27 12:08             ` Jean-Pierre Rosen
2007-04-27 15:41               ` Adam Beneschan [this message]
2007-04-27 16:43                 ` Ray Blaak
2007-04-27 19:04                   ` Randy Brukardt
2007-04-25 10:01       ` Markus E Leypold
2007-04-24  9:16   ` Georg Bauhaus
2007-04-24 17:54 ` Pascal Obry
2007-04-26  2:31   ` David Smith
2007-04-26 19:03     ` Pascal Obry
2007-04-26 19:41       ` Georg Bauhaus
2007-04-26 20:30         ` Pascal Obry
2007-04-27  1:47       ` Adam Beneschan
2007-04-27  2:51         ` David Smith
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox