comp.lang.ada
 help / color / mirror / Atom feed
From: lutz@iks-jena.de (Lutz Donnerhacke)
Subject: Re: Ada.Streams.Read Length Paramenter is not IN?
Date: Tue, 7 Aug 2001 20:18:18 +0000 (UTC)
Date: 2001-08-07T20:18:18+00:00	[thread overview]
Message-ID: <slrn9n0j8a.gbg.lutz@belenus.iks-jena.de> (raw)
In-Reply-To: BBWb7.1834$NJ6.7602@www.newsranger.com

* Ted Dennison wrote:
>In article <slrn9mvbej.hs.lutz@taranis.iks-jena.de>, Lutz Donnerhacke says...
>>OTOH each T'Read or T'Input procedure exactly knows how many
>>Storage_Elements are needed to fullfill the request. Why is this
>>information not given to the Stream.Read procedure?
>
>It is. That information is Item'length.

Yep. I got this idea a few hours ago. But now it's too late to cancel my
proof of stupity.

>One of the nifty things about Ada is that we don't need a separate
>parameter to specify how large a passed-in buffer is.

I was confused by functions returning arrays. I didn't get at once, that an
OUT parameter implicitly provides the discriminants as IN parameters.

>You may protest that there's no guarantee that they won't give you a
>bigger buffer than they need, but the guarantee is implied.

Don't worry. I got it.




  reply	other threads:[~2001-08-07 20:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-07  9:02 Ada.Streams.Read Length Paramenter is not IN? Lutz Donnerhacke
2001-08-07 18:39 ` Ted Dennison
2001-08-07 20:18   ` Lutz Donnerhacke [this message]
2001-08-07 19:48 ` tmoran
2001-08-07 20:21   ` Lutz Donnerhacke
replies disabled

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