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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.fsmpi.rwth-aachen.de!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 11 Dec 2013 17:54:25 +0100 From: "G.B." User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Binary versus text and compiler versions, was: Re: Will Ada-95 Programs Written in MS Windows Run in MacOS and Linux Without Some Tweaking. References: <1d445f04-b670-444f-9858-55da271fe17a@googlegroups.com> <2b6dc37f-4aa6-4c18-be59-8c09f6f37f01@googlegroups.com> <52a87c86$0$6659$9b4e6d93@newsspool2.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <52a898c1$0$6668$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 11 Dec 2013 17:54:26 CET NNTP-Posting-Host: 2baa3a11.newsspool2.arcor-online.net X-Trace: DXC=ZLh>_cHTX3j]::05__1``L[ X-Complaints-To: usenet-abuse@arcor.de Xref: number.nntp.dca.giganews.com comp.lang.ada:184200 Date: 2013-12-11T17:54:26+01:00 List-Id: On 11.12.13 16:14, Eryndlia Mavourneen wrote: > What is the problem with simply reading binary disk blocks as 8-bit text using Sequential_IO, since Austin wants to use the attributes 'Pos and 'Val on the data stream? The odd thing is that this discussion is about problems caused by Text_IO, line endings, ^Z, and the alleged portability of text files. Which, obviously, is not a fact. First, potential BOMs added by smart editors or email clients, automatic line ending transformation (unzip -a), etc. What is more, if text is read using Text_IO by a program running on this or that OS, calling this or that compiler's implementation of Text_IO, of an ISO blessed language (Ada), then still the results that are computed from the text could well be different. That is, the interpretation of the message changes, which is the one thing that text is supposed to prevent... Not long ago, a magical calendar date (UTC) has passed, way into the 21st century, Hurray : Time := Time_Of (Day => (10 + 1), Month => (10 + 2), Year => (10 + 3) + 2000, Seconds => ((10 + 4) * Hour + (10 + 5) * Minute + (10 + 6) * s)); yet it seems we cannot reliably perform basic file I/O. (Reading binary disk blocks as 8-bit text could work if reading is not from the network .IFF: padding bits are handled and disk block sizes agree everywhere and low numbered characters work at the Text_IO layer. I guess.)