comp.lang.ada
 help / color / mirror / Atom feed
From: "Jean-Pierre Rosen" <rosen.adalog@wanadoo.fr>
Subject: Re: About conversions
Date: 2000/11/24
Date: 2000-11-25T09:13:46+00:00	[thread overview]
Message-ID: <8vnvsa$pro$1@wanadoo.fr> (raw)
In-Reply-To: u8zqe5klh.fsf@gsfc.nasa.gov

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]


"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> a �crit dans le message news: u8zqe5klh.fsf@gsfc.nasa.gov...
> Robert Dewar <robert_dewar@my-deja.com> writes:
>
> > <snip explanation of type conversion on OUT parameter>
> >
> > It's really there to provide an easy explanation for what
> > happens in the case of derived types. I think it's actually
> > misguided, because although it makes the explanation of derived
> > types easier, it introduces a bogus misleading feature into the
> > language that is of very little practical use and which causes a
> > lot of confusion, even among people who know Ada well!
>
> I think that's a bit strong. I've had occasion to use type conversion
> on out parameters, without using derived types (no examples readily at
> hand, or at least they are hard to find). I should think needing to
> convert an out parameter would happen about as often as needing to
> convert an in parameter, or a function result. The syntax may seem a
> little backwards, but if you think of it as "convert this object as
> needed to match the subprogram specification" it makes more sense.
>
Typical example is if you define:
type My_String is array (My_integer_type range <>) of character;

It is nice to be able to use Get_Line...

--
---------------------------------------------------------
           J-P. Rosen (Rosen.Adalog@wanadoo.fr)
Visit Adalog's web site at http://pro.wanadoo.fr/adalog






  parent reply	other threads:[~2000-11-24  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-20  0:00 About conversions Sandro Binetti
2000-11-20  0:00 ` Ken Garlington
2000-11-20  0:00   ` Robert Dewar
2000-11-20  0:00     ` Stephen Leake
2000-11-21  0:00       ` Robert Dewar
2000-11-21  0:00         ` Warren W. Gay VE3WWG
2000-11-21  0:00           ` Robert Dewar
2000-11-21  0:00             ` Ted Dennison
2000-11-22  3:27               ` Warren W. Gay VE3WWG
2000-11-22  4:54               ` Robert Dewar
2000-11-22  0:00                 ` Ted Dennison
2000-11-22  0:00                 ` Wes Groleau
2000-11-22  0:00         ` Tristan Gingold
2000-11-24  0:00         ` Jean-Pierre Rosen
2000-11-24  0:00       ` Jean-Pierre Rosen [this message]
2000-11-21  2:57     ` DuckE
2000-11-21  0:00       ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2000-11-23  6:21 Christoph Grein
2000-11-23  0:00 ` Wilhelm Spickermann
2000-11-23  0:00   ` Florian Weimer
2000-11-23  0:00     ` Wilhelm Spickermann
2000-11-28  2:20   ` Robert Dewar
2000-11-24  0:00 Christoph Grein
2000-11-28  1:33 ` Robert Dewar
replies disabled

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