From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Characters package
Date: 2000/04/27
Date: 2000-04-27T00:00:00+00:00 [thread overview]
Message-ID: <wccitx3xzih.fsf@world.std.com> (raw)
In-Reply-To: 39084cc7@news.wa.apana.org.au
"Anderson" <anderson@wa.apana.org.au> writes:
> I want to use the to_lower and to_higher function in the characters package
> in ada. I can do it by using
>
> with Ada.Characters.Handling;
> use Ada.Characters.Handling;
>
> but I am told I is bad code to make it visible throughtout the program, so
> how do I declear it as a package
> ie package char ..... ?
I haven't seen your program, so I don't know if the above is bad style
or not. Some alternatives are:
Move the use clause into a smaller scope.
Eliminate the use clause, and call it using the full name
Ada.Characters.Handling.To_Upper.
Say "with Ada.Characters.Handling; use Ada;", and call it using the
name Characters.Handling.To_Upper.
Rename Ada.Characters.Handling to, say, Chars, and write
Chars.To_Upper.
- Bob
prev parent reply other threads:[~2000-04-27 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-27 0:00 Characters package Anderson
2000-04-27 0:00 ` Robert A Duff [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox