comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: "with"ing package Standard
Date: 2000/05/17
Date: 2000-05-17T00:00:00+00:00	[thread overview]
Message-ID: <8ftsoa$ms2$1@nnrp1.deja.com> (raw)
In-Reply-To: q_lU4.13918$wb7.1292608@news.flash.net

In article <q_lU4.13918$wb7.1292608@news.flash.net>,
  "Ken Garlington" <Ken.Garlington@computer.org> wrote:
> Should I be able to "with" package Standard and/or its
children, e.g.
>
> with Ada.Text_IO, Standard.ASCII;
> procedure Test_Return is
> begin
>   Ada.Text_IO.Put_Line("The position of ASCII.CR is " &
>     Integer'Image(Character'Pos(ASCII.CR)));
> end Test_Return;


This is legal, but only if you have declared a package
called Standard, with a child package called ASCII.

In pragmatic terms, your program is doubly wrong.

First, you can't with Standard itself, since all library units
are child units of Standard. A with of Standard, means you are
trying to with Standard.Standard.

Second, ASCII is a subpackage, not a child package of standard
and you cannot WITH a subpackage.




Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-05-17  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-17  0:00 "with"ing package Standard Ken Garlington
2000-05-17  0:00 ` Robert Dewar [this message]
2000-05-17  0:00 ` Robert A Duff
2000-05-17  0:00 ` Steve Folly
replies disabled

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