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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: How to write "Hello" to a text file without a line terminator Date: Sun, 14 Aug 2016 15:31:04 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <2cc97e17-313e-44b8-b335-8d5e815e925a@googlegroups.com> <4c49991e-9001-464f-afbb-3fcbf78e5656@googlegroups.com> <41b076f1-66b0-4142-8b91-0e717b6176c2@googlegroups.com> <7dd84caf-d094-4498-a6f1-91e275f09346@googlegroups.com> NNTP-Posting-Host: xelDFTENDI+dlkJFd2Ot2w.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:31435 Date: 2016-08-14T15:31:04+02:00 List-Id: On 2016-08-14 13:28, Simon Wright wrote: > "Dmitry A. Kazakov" writes: > >> On 2016-08-14 11:40, Simon Wright wrote: >> >>> I am saying that (it seems to me that) it is impossible to read back >>> from Sequential_IO with an unconstrained type even on the same machine >>> with the same compiler. >> >> You can through S'Input. Read is just a wrapper for S'Read, it could >> have been omitted too. > > Sequential_IO (String) outputs the length in 8 bytes (on macOS, anyway); > String'Output outputs the first and last indices as 4 bytes each. Onr my 64-bit Windows 10 box Sequential_IO (String) Write makes a 4 bytes prefix (32-bit length, I guess). E.g. "abcd" it does 4, 0, 0, 0, 'a', 'b', 'c', 'd'. I think it depends on whether the GNAT is targeted for 32- or 64-bit and not on the actual OS. What a mess! All this is just wrong. It should have been 'a', 'b', 'c', 'd'. Though RM conveniently tells nothing about its semantics, the name and parameters profile suggests one of S'Write, no constraints read/written. But honestly who would ever care? The package is clearly obsolete and under/ill-specified. Should never be used anywhere. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de