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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2e2db8edf2656165 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Constructing an object Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1lw8oz33ao529.12ep5ay7rg4oc$.dlg@40tude.net> Date: Thu, 22 Sep 2005 15:33:54 +0200 Message-ID: NNTP-Posting-Date: 22 Sep 2005 15:33:54 MEST NNTP-Posting-Host: d4644e08.newsread2.arcor-online.net X-Trace: DXC=ABSoKo87?IRUEj^fn36YV^Q5U85hF6f;TjW\KbG]kaMX[0PR?bTRIhW>>YL_Y>ESZXM]jJ8ai@EKZ:Mncf^?`0EVfLL]lTkB=;Y X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:5029 Date: 2005-09-22T15:33:54+02:00 List-Id: On Thu, 22 Sep 2005 09:45:24 +0200, Maciej Sobczak wrote: > function Get_New(Param : in SomeType) returns OtherType is > begin > -- ... > end Get_Value; > > type Record (Param : SomeType) is record > X : OtherType := Get_New(Param); > end record; > > A : Record(7); > > This way, I can execute some action in order to initialize the object, > and even use some parameters. > > Further questions: Are there any restrictions on SomeType? Yes. It must be either a discrete or access type. In the latter case the discriminated type has to be limited. So there a sufficient limitations on what can be hidden behind X : T(Y); -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de