From: "Beard, Frank" <beardf@spawar.navy.mil>
To: "'comp.lang.ada@ada.eu.org'" <comp.lang.ada@ada.eu.org>
Subject: RE: Using renaming declarations to make private subprograms visib le
Date: Wed, 29 Aug 2001 13:26:10 -0400
Date: 2001-08-29T13:26:10-04:00 [thread overview]
Message-ID: <mailman.999106002.8447.comp.lang.ada@ada.eu.org> (raw)
-----Original Message-----
From: Matthew Woodcraft [mailto:mattheww@chiark.greenend.org.uk]
> Matthew,
> But Ada.String.Unbounded.To_String is a function which return an
> Ada.Strings.Unbounded.Unbounded_String. The function which I want to
> make visible is its implicitly-defined cousin, which returns a Token.
You're right. I don't know what I was thinking. I think the only
"quick" way, short of Steve's perfectly reasonable option, it to
do the following:
with Ada.Strings.Unbounded;
package Foo is
type Token_Type is private;
function To_Token (Source : String) return Token_Type;
--function To_String (Source : Token_Type) return String;
function To_Token_String (Source : Token_Type) return String;
private
type Token_Type is new Ada.Strings.Unbounded.Unbounded_String;
function To_Token (Source : String) return Token_Type
renames To_Unbounded_String;
-- function To_String (Source : Token_Type) return String
-- renames To_String;
function To_Token_String (Source : Token_Type) return String
renames To_String;
end Foo;
Frank
next reply other threads:[~2001-08-29 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-29 17:26 Beard, Frank [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-08-28 20:19 Using renaming declarations to make private subprograms visib le Beard, Frank
2001-08-28 22:42 ` Matthew Woodcraft
2001-08-29 4:18 ` DuckE
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox