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: 103376,90108ed846e3f1bf X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!j8g2000yql.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: Language lawyer question: task activation Date: Fri, 20 Feb 2009 02:34:22 -0800 (PST) Organization: http://groups.google.com Message-ID: <3c8b512a-234a-4315-bdc0-36f07baaacb2@j8g2000yql.googlegroups.com> References: <0Ludnf3mRdnyHgPUnZ2dnUVZ8vGdnZ2d@posted.plusnet> NNTP-Posting-Host: 80.156.44.178 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1235126062 15938 127.0.0.1 (20 Feb 2009 10:34:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 20 Feb 2009 10:34:22 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j8g2000yql.googlegroups.com; posting-host=80.156.44.178; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 6.8.3.4214) Xref: g2news1.google.com comp.lang.ada:3711 Date: 2009-02-20T02:34:22-08:00 List-Id: On Feb 20, 11:18=A0am, Robert_Matthews wrote: > > =A0 =A0 task type TType is > > =A0 =A0 =A0 =A0 entry E1; > > =A0 =A0 end TType; > > > =A0 =A0 function Func return TType is > > =A0 =A0 begin > > =A0 =A0 =A0 =A0 return X : TType; > > =A0 =A0 end Func; > But isn't there another issue here: task types are limited, therefore Fun= c > is a constructor function, but in what object does it construct its retur= ned Ada 95: TType is a by-reference-type, Func returns a read-only view. Ada 2005: Func is build-in-place. In both cases, the returned object is local to Do_It and disappears as soon as Do_It returns. Of course for Do_It to be able to return, the task has to terminate before.