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!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.bbs-scene.org!xmission!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: 4 beginner's questions on the PL Ada Date: Fri, 09 Aug 2013 19:48:11 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <87ob96ajv6.fsf@VLAN-3434.student.uu.se> <03ea570b-e45f-4694-ab9b-3413c4770379@googlegroups.com> <878v0aee8i.fsf@VLAN-3434.student.uu.se> <87ob96cxm8.fsf@VLAN-3434.student.uu.se> <87d2pmcwpe.fsf@VLAN-3434.student.uu.se> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls7.std.com 1376092091 5281 192.74.137.71 (9 Aug 2013 23:48:11 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 9 Aug 2013 23:48:11 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:mO+cVR320VWL6QUfsu5DOiFcfQs= X-Original-Bytes: 2271 Xref: number.nntp.dca.giganews.com comp.lang.ada:182917 Date: 2013-08-09T19:48:11-04:00 List-Id: Emanuel Berg writes: > Aha! I don't use new, I just setup the tasks specifications and > bodies (three of them), and then > > begin > null; > end; > > I assumed I got three tasks, concurrently, one of each type, all > unique with regards to their human readable name, with no need for > the control block hex? Yes. In that case, it might be reasonable to write a function to chop off the hex part, something like: function My_Image return String is X : constant String := Image(Current_Task); begin for J in reverse X'Range loop if X(J) = '_' then return X(X'First..J-1); end if; end loop; return X; end My_Image; I didn't compile the above -- it might have typos/bugs. I assume this is all for debugging/logging/tracing. So it doesn't really matter too much what My_Image does, so long as it doesn't crash. If/when you start using "new", or switch to a different Ada compiler, you can tweak that function. - Bob