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-Thread: a07f3367d7,92a6dd552088ca30 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!p37g2000prp.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Constructor for a class with a task defined Date: Wed, 31 Aug 2011 18:40:15 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1314841303 5993 127.0.0.1 (1 Sep 2011 01:41:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 1 Sep 2011 01:41:43 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p37g2000prp.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:21781 Date: 2011-08-31T18:40:15-07:00 List-Id: On Aug 31, 5:31=A0pm, "Rego, P." wrote: > I'm trying to implement a Constructor method for a class which have a tas= k type pointed to the class, so > > in spec: > type Small_Class; > > task type My_Task_Type (This_Small_Class : access Small_Class); > > type Small_Class is tagged limited > =A0 =A0 =A0 record > =A0 =A0 =A0 =A0 =A0My_Task =A0 =A0 =A0: My_Task_Type (Small_Class'Access)= ; > =A0 =A0 =A0 end record; > > and in body: > > function Construct return access Small_Class is > =A0 =A0begin > =A0 =A0 =A0 return new Small_Class'(My_Task =3D> ???????); > end Construct; > > So, how can I do it? I would think return new Small_Class'(My_Task =3D> <>); should work. -- Adam