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=unavailable autolearn_force=no version=3.4.4 X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 Path: border1.nntp.ams.giganews.com!nntp.giganews.com!proxad.net!feeder2-2.proxad.net!nntpfeed.proxad.net!news.muarf.org!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: 4 beginner's questions on the PL Ada Date: Fri, 9 Aug 2013 14:01:54 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <87ob96ajv6.fsf@VLAN-3434.student.uu.se> <03ea570b-e45f-4694-ab9b-3413c4770379@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1376074915 8021 69.95.181.76 (9 Aug 2013 19:01:55 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 9 Aug 2013 19:01:55 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: number.nntp.dca.giganews.com comp.lang.ada:182892 Date: 2013-08-09T14:01:54-05:00 List-Id: "Adam Beneschan" wrote in message news:03ea570b-e45f-4694-ab9b-3413c4770379@googlegroups.com... On Friday, August 9, 2013 9:50:53 AM UTC-7, Emanuel Berg wrote: ... >> 3. Is it possible to get the task *name* (from the code) into a >> string, programatically? That way, a generic procedure could be >> used to communicate from tasks, with Put_Line, and without having >> to hard code the task name every time. > >No, not really. One thing to keep in mind is that Ada has task *types*, so >that >you can declare a task type and then start any number of tasks of that >type. > And the tasks don't have to be associated with variables; you can start an >array of tasks: This is true, but Ada has a better solution for the original problem -- use the task identifier (which can be displayed, it has an Image function). Every task has a task id. See http://www.ada-auth.org/standards/12rm/html/RM-C-7-1.html. Randy.