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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c689b55786a9f2bd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.erje.net!news2.arglkargh.de!news.karotte.org!uucp.gnuu.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: for S'Image use Func?? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4be417b4$0$6992$9b4e6d93@newsspool4.arcor-online.net> <1qcb6z4i20dyb.1dz2hd4c0vx69.dlg@40tude.net> Date: Tue, 11 May 2010 19:59:34 +0200 Message-ID: <1qfu2ba65pd63$.asc7m201hi6u$.dlg@40tude.net> NNTP-Posting-Date: 11 May 2010 19:59:31 CEST NNTP-Posting-Host: 0d10e0b5.newsspool2.arcor-online.net X-Trace: DXC=aPG[nG60Zek9kIfcjg:0fdA9EHlD;3Ycb4Fo<]lROoRa8kF On Tue, 11 May 2010 17:17:38 +0000 (UTC), Warren wrote: > =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= expounded in > news:op.vcig7go1ule2fv@garhos: > >> Le Mon, 10 May 2010 22:56:11 +0200, Maciej Sobczak >> a écrit: >>> Coming back to I/O - what I miss in Ada is the equivalent of fread in >>> C - that is, an operation that reads *up to* the given number of >>> bytes. Or maybe there is something that I didn't notice? > >> It's there : look at [ARM 2005 13.13.1] which defines the package >> Ada.Streams, which in turn contains the following : >> >> type Root_Stream_Type is abstract tagged limited private; >> ... >> type Stream_Element is mod implementation-defined; >> ... > ... >> Well, to be honest, this is not exactly the same as with C, as >> Ada.Streams.Stream_Element is implementation defined (which is good, >> because this is indeed platform dependent), so you will need .. > > All this is well and good for applications that can work in > "implementation defined" units of type Stream_Element. A pragma > won't fix the problem should it be different than a byte. Granted, > it will never likely come up on the platforms I have in mind. If you to read a character stream, just do so: Item := Character'Read (S); Character'Write (S, Item); For octet streams use Unsigned_8. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de