From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd913e780983783a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-29 10:27:34 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "Beard, Frank" Newsgroups: comp.lang.ada Subject: RE: Using renaming declarations to make private subprograms visib le Date: Wed, 29 Aug 2001 13:26:10 -0400 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 999106053 40240 137.194.161.2 (29 Aug 2001 17:27:33 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 29 Aug 2001 17:27:33 +0000 (UTC) To: "'comp.lang.ada@ada.eu.org'" Return-Path: X-Mailer: Internet Mail Service (5.5.2448.0) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:12564 Date: 2001-08-29T13:26:10-04:00 -----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