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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1e08410099d337f8 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news.zanker.org!feeder1.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!proxad.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: "Luke A. Guest" Newsgroups: comp.lang.ada Subject: Re: creating own Image function Date: Wed, 29 Dec 2004 17:20:55 +0000 Message-ID: References: <1104339103.436794.134250@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: abyss2.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.demon.co.uk 1104340855 11168 62.49.62.197 (29 Dec 2004 17:20:55 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 29 Dec 2004 17:20:55 +0000 (UTC) User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Xref: g2news1.google.com comp.lang.ada:7301 Date: 2004-12-29T17:20:55+00:00 List-Id: On Wed, 29 Dec 2004 18:04:08 +0100, Mark Lorenzen wrote: > "R" writes: > >> Hello. >> >> I've written my own Image function it's sth like Java's toString. >> >> function Image(this: rec1) return String is >> tmp : String(1..26); >> begin >> tmp := "The value of field is:" & Integer'Image(Get(this)); >> return tmp; >> end Image; > > Your questions are really newbee questions and I recommend that you > read a book about Ada in order to get it right from the beginning and > not take your knowledge of other languages into "Ada world". Hmmm, a bit too harsh, me thinks. Obviously, just correcting it like you did would've been enough. Although, he does have a good point (kind of), about creating your own image functions, I would prefer it if you could provide an Image function for a type and have T'Image call that function. That would be a really nice addition to the language. Luke.