comp.lang.ada
 help / color / mirror / Atom feed
From: "Luke A. Guest" <laguest@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk>
Subject: Re: creating own Image function
Date: Wed, 29 Dec 2004 17:20:55 +0000
Date: 2004-12-29T17:20:55+00:00	[thread overview]
Message-ID: <pan.2004.12.29.17.20.54.74557@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk> (raw)
In-Reply-To: m3acrx6np3.fsf@0x5358ef74.boanxx18.adsl-dhcp.tele.dk

On Wed, 29 Dec 2004 18:04:08 +0100, Mark Lorenzen wrote:

> "R" <ruthless@poczta.onet.pl> 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.




  reply	other threads:[~2004-12-29 17:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-29 16:51 creating own Image function R
2004-12-29 17:01 ` Vinzent 'Gadget' Hoefler
2004-12-29 17:04 ` Mark Lorenzen
2004-12-29 17:20   ` Luke A. Guest [this message]
2004-12-29 20:56     ` Mark Lorenzen
2004-12-30  4:04       ` Jeffrey Carter
2004-12-30  8:32         ` Vinzent 'Gadget' Hoefler
2004-12-30  4:02     ` Jeffrey Carter
2005-01-15 23:58       ` Sandro Magi
2004-12-29 17:06 ` Bobby D. Bryant
2004-12-29 17:46   ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox