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!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!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: Sat, 10 Aug 2013 01:50:25 +0200 Organization: Aioe.org NNTP Server Message-ID: <871u62ctku.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> <87ob96cxm8.fsf@VLAN-3434.student.uu.se> <87d2pmcwpe.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:hsTe+Ritawa6rCEEW+36YTiuWn4= X-Original-Bytes: 2126 Xref: number.nntp.dca.giganews.com comp.lang.ada:182918 Date: 2013-08-10T01:50:25+02:00 List-Id: Robert A Duff writes: > 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. Yes, this is more like it! OK, point taken. Will read, then try the code, now. -- Emanuel Berg - programmer (hire me! CV below) computer projects: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573