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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: comp.lang.ada Subject: Re: 4 beginner's questions on the PL Ada Date: Sat, 10 Aug 2013 00:23:11 +0200 Organization: Aioe.org NNTP Server Message-ID: <87ob96cxm8.fsf@VLAN-3434.student.uu.se> References: <87ob96ajv6.fsf@VLAN-3434.student.uu.se> <03ea570b-e45f-4694-ab9b-3413c4770379@googlegroups.com> <878v0aee8i.fsf@VLAN-3434.student.uu.se> NNTP-Posting-Host: SWN/nubmpQxYKwY7hPy4YA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:cECFOnsl012o0xzapBOIqsEn1lk= Xref: news.eternal-september.org comp.lang.ada:16748 Date: 2013-08-10T00:23:11+02:00 List-Id: Robert A Duff writes: >> Task_Name : constant String := Image(Current_Task); >> >> It produces output like >> >> add_one_081838Dt > > I doubt that "t". ;-) You are right! No wonder that pattern was hard to "recognize"... > This is all GNAT-specific, of course. Some other Ada compiler > can return something completely different. I guess I use GNAT because I compile with gnatmake: gcc-4.6 -c, gnatbind -x, and last gnatlink. > Trimming the string might not be a good idea -- it uniquely > identifies the task in case the name part doesn't. Yeah, but aren't the names unique as long as there aren't more than one instance of each task? I don't mean to trim the actual data, which I BTW am very far from knowing how to do, I mean just dump the task name (the letters) in a new string, and use that for communicating the task's name (to a human, executing the program). -- Emanuel Berg - programmer (hire me! CV below) computer projects: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573