comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: How to write "Hello" to a text file without a line terminator
Date: Sun, 14 Aug 2016 15:31:04 +0200
Date: 2016-08-14T15:31:04+02:00	[thread overview]
Message-ID: <noprqn$jre$1@gioia.aioe.org> (raw)
In-Reply-To: lymvkf1tfg.fsf@pushface.org

On 2016-08-14 13:28, Simon Wright wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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

  reply	other threads:[~2016-08-14 13:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12  4:05 How to write "Hello" to a text file without a line terminator Jerry
2016-08-12  6:41 ` G.B.
2016-08-12  7:23 ` Dmitry A. Kazakov
2016-08-12  7:41   ` J-P. Rosen
2016-08-12  7:46     ` Jerry
2016-08-12  7:44   ` Jerry
2016-08-12 17:34     ` Jeffrey R. Carter
2016-08-13  3:21       ` Jerry
2016-08-13  4:23         ` Jeffrey R. Carter
2016-08-13  9:12           ` AdaMagica
2016-08-13 18:03             ` Jeffrey R. Carter
2016-08-14  7:58               ` AdaMagica
2016-08-14  8:30                 ` Simon Wright
2016-08-14  8:54                   ` Dmitry A. Kazakov
2016-08-14  9:40                     ` Simon Wright
2016-08-14 10:17                       ` Dmitry A. Kazakov
2016-08-14 11:28                         ` Simon Wright
2016-08-14 13:31                           ` Dmitry A. Kazakov [this message]
2016-08-15 23:35                       ` Randy Brukardt
2016-08-14 13:28                   ` AdaMagica
2016-08-14 13:54                     ` Simon Wright
2016-08-14 17:05                     ` Jeffrey R. Carter
2016-08-14 18:26                       ` AdaMagica
2016-08-14 19:19                         ` Dmitry A. Kazakov
2016-08-14 13:32                   ` AdaMagica
2016-08-14 16:39                   ` Jeffrey R. Carter
2016-08-12  7:46   ` Simon Wright
     [not found]   ` <noka54$ci$1@dont-email.me>
2016-08-12 13:44     ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox