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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6b7d31ee31aa032 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-07 13:23:39 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: Ada.Streams.Read Length Paramenter is not IN? Date: Tue, 7 Aug 2001 20:18:18 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: NNTP-Posting-Host: belenus.iks-jena.de X-Trace: branwen.iks-jena.de 997215498 32092 217.17.192.34 (7 Aug 2001 20:18:18 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Tue, 7 Aug 2001 20:18:18 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:11524 Date: 2001-08-07T20:18:18+00:00 List-Id: * Ted Dennison wrote: >In article , 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.