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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: Text_IO, was: Re: Something I don't understand Date: Wed, 19 Feb 2014 22:01:43 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <4a3e55f6-9f54-4084-9f37-96efd4b0d349@googlegroups.com> <0b358700-871b-4603-addd-65e07c7d59e5@googlegroups.com> Injection-Date: Wed, 19 Feb 2014 22:01:43 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e458ff8b81bc0c159989eb0e36c6e372"; logging-data="3211"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8/OkvbglAHNgy0XTJHgOaEThBdYmU3qg=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:tNaLu6E3ZjgVRgJGa8fXC/MlgL0= Xref: news.eternal-september.org comp.lang.ada:18680 Date: 2014-02-19T22:01:43+00:00 List-Id: On 2014-02-19, Robert A Duff wrote: > Simon Clubley writes: >> >> _Totally_ agree with this. It would also be nice if one could write >> something like this (pseudo Fortran style to get the idea across): >> "5(I4,2X,F10.4,2X)" so you could specify the layout for 5 columns worth >> (in this example) of data cleanly. > > That's not really what I meant by "simplified". ;-) > :-) >> >> Yes, but you may need two methods. One for binary (unchanged) input and >> one for text input with end of line conversions. > > Maybe. Should the binary one return a String, or an array of bytes, > or something else? > Conceptually, I would have to say an array of bytes data type distinct from a String. This is based on my perception of a String as been associated with text data (after all, it _is_ called a String :-)) and that conceptually you cannot really assign such meaning to something you have gone to the trouble to read as binary data. What really matters is that you can guarantee the binary data will not be altered during the I/O process, that you know the exact length of the data, and that you can cleanly access the bytes in the binary data. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world