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: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: comp.lang.ada Subject: Re: 4 beginner's questions on the PL Ada Date: Fri, 09 Aug 2013 23:38:53 +0200 Organization: Aioe.org NNTP Server Message-ID: <878v0aee8i.fsf@VLAN-3434.student.uu.se> References: <87ob96ajv6.fsf@VLAN-3434.student.uu.se> <03ea570b-e45f-4694-ab9b-3413c4770379@googlegroups.com> 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:u8o8VMX7UWFvwKI+N380v+/Nu40= X-Original-Bytes: 1802 Xref: number.nntp.dca.giganews.com comp.lang.ada:182903 Date: 2013-08-09T23:38:53+02:00 List-Id: "Randy Brukardt" writes: > 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. Yes! This works great: with Ada.Task_Identification; use Ada.Task_Identification; Task_Name : constant String := Image(Current_Task); It produces output like add_one_081838Dt if the task is referred to as Add_One in the code. The 8-char code that follows doesn't look like anything I recognize. Is it a random string ID, or is is generated out of anything sensible? If it always is 8 chars (and an underscore), I guess I could simply trim the strings. -- Emanuel Berg - programmer (hire me! CV below) computer projects: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573