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-Thread: 103376,57b537327d52e653 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 02 Aug 2007 22:18:26 +0200 From: Gautier User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Byte streams References: <1186082475.711489.104420@e9g2000prf.googlegroups.com> In-Reply-To: <1186082475.711489.104420@e9g2000prf.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 83.76.165.221 X-Original-NNTP-Posting-Host: 83.76.165.221 Message-ID: <46b23bef_7@news.bluewin.ch> X-Trace: news.bluewin.ch 1186085871 83.76.165.221 (2 Aug 2007 22:17:51 +0200) Organization: Bluewin AG Complaints-To: abuse@bluewin.ch X-Original-NNTP-Posting-Host: 127.0.0.1 Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!164.128.36.58!news.ip-plus.net!newsfeed.ip-plus.net!news.bluewin.ch!not-for-mail Xref: g2news2.google.com comp.lang.ada:1331 Date: 2007-08-02T22:18:26+02:00 List-Id: You seem to bump against the "strong-typing vs. mixed data stream" issue that Ada 95 (and later) solves with Ada.Streams. No need to define i/o for every type, no need of unchecked_conversion; and unconstrained types are also supported iirc. Look at the 'Read, 'Write, 'Input, 'Output ( a bit of search gives... http://www.adaic.com/standards/95lrm/html/RM-13-13-2.html ) Here is an example of a custom input stream, from a zip file: http://homepage.sunrise.ch/mysunrise/gdm/uza_html/test_unz_streams__adb.htm Maybe you are looking at something else, but I have the impression that you'll like these streams... HTH ______________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/index.htm Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!