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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,23777acd564d513b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-18 07:20:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Problem Eliminating constructors Date: 18 Jan 2003 15:19:34 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <3e274cad$0$33929$bed64819@news.gradwell.net> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1042903222 18876 62.49.19.209 (18 Jan 2003 15:20:22 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 18 Jan 2003 15:20:22 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:33179 Date: 2003-01-18T15:19:34+00:00 List-Id: porton@ex-code.com (Victor Porton) writes: > package A is > > type A_Type is tagged > record > X: Integer; > end; > > function Create(X: Integer) return A_Type; -- guess what is the body Could you make Create return A_Type'Class? (it means you probably have to initialize at creation: declare My_B : A.A_Type'Class := B.Create (...); > end A;