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: 103376,3ae40b42b99b8123 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.kamp.net!newsfeed0.kamp.net!feeder.news-service.com!xlned.com!feeder1.xlned.com!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Little tutorial about streams Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Tue, 1 Mar 2011 11:16:01 +0100 Message-ID: NNTP-Posting-Date: 01 Mar 2011 11:16:01 CET NNTP-Posting-Host: d6be82d3.newsspool3.arcor-online.net X-Trace: DXC=;XK@]HRB74okIm;?DS@McF=Q^Z^V3H4Fo<]lROoRA8kF On Mon, 28 Feb 2011 21:48:19 -0600, Randy Brukardt wrote: > Clearly, the default implementation, being dependent on the machine and > compiler, can be useful only if the data is written and read by programs > compiled with the same compiler. If the data, for example, is to be sent > across the network and read by a program written in another language, > running on an unknown architecture, it is important for the programmer to > control the format of the data sent over the wire. Because of this exigence, > Ada allows the programmer to override S'Write (and the other stream-related > functions described in the following), using an attribute definition clause > (RM 13.3): You can also mention chain code as a technique to implement S'Read/Write in a platform independent way. Of course one problem remains: the type of the stream I/O unit. A good candidate might be Character'Read/Write. That should work in most cases. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de