* Characters package
@ 2000-04-27 0:00 Anderson
2000-04-27 0:00 ` Robert A Duff
0 siblings, 1 reply; 2+ messages in thread
From: Anderson @ 2000-04-27 0:00 UTC (permalink / raw)
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 ..... ?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Characters package
2000-04-27 0:00 Characters package Anderson
@ 2000-04-27 0:00 ` Robert A Duff
0 siblings, 0 replies; 2+ messages in thread
From: Robert A Duff @ 2000-04-27 0:00 UTC (permalink / raw)
"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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-04-27 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-27 0:00 Characters package Anderson
2000-04-27 0:00 ` Robert A Duff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox