comp.lang.ada
 help / color / mirror / Atom feed
From: Frank Buss <fb@frank-buss.de>
Subject: Re: quiz for Sequential_IO Read
Date: Sun, 3 Sep 2017 14:43:28 +0200
Date: 2017-09-03T14:43:28+02:00	[thread overview]
Message-ID: <oogtdg$c7c$1@newsreader4.netcologne.de> (raw)
In-Reply-To: <oogsdi$1eps$1@gioia.aioe.org>

On 09/03/2017 02:26 PM, Dmitry A. Kazakov wrote:
> On 2017-09-03 13:01, Frank Buss wrote:
>> What does this program output?
>
> Garbage.
>
>> with Ada.Sequential_IO;
>> with Ada.Text_IO; use Ada.Text_IO;
>>
>> procedure Hello is
>>
>>     type Byte is range 0..255;
>>
>>     package Byte_IO is new Ada.Sequential_IO(Byte);
>
> Ada.Streams.Stream_IO is for the purpose.
>
> (Sequential_IO is practically never used)

I started learning Ada today, where can I read about good coding 
practice, and how would the example look like with Stream_IO, and maybe 
even a correct version?

I read about Sequential_IO in the Ada Programming wikibook, where it is 
recommended for homogeneous binary data:

https://en.wikibooks.org/wiki/Ada_Programming/Input_Output

-- 
Frank Buss, http://www.frank-buss.de
electronics and more: http://www.youtube.com/user/frankbuss

  reply	other threads:[~2017-09-03 12:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03 11:01 quiz for Sequential_IO Read Frank Buss
2017-09-03 11:40 ` Jeffrey R. Carter
2017-09-03 12:47   ` Frank Buss
2017-09-03 13:44     ` Jeffrey R. Carter
2017-09-03 15:38       ` AdaMagica
2017-09-03 12:26 ` Dmitry A. Kazakov
2017-09-03 12:43   ` Frank Buss [this message]
2017-09-03 13:11     ` Dmitry A. Kazakov
2017-09-04 19:58       ` Frank Buss
2017-09-04 20:55         ` Dmitry A. Kazakov
2017-09-04 21:51           ` Frank Buss
2017-09-05  1:54             ` Dennis Lee Bieber
2017-09-03 17:28 ` J-P. Rosen
2017-09-03 20:10   ` Frank Buss
2017-09-04  5:12     ` J-P. Rosen
2017-09-04  7:37     ` Dmitry A. Kazakov
2017-09-03 20:17   ` Dennis Lee Bieber
2017-09-04  5:14     ` J-P. Rosen
replies disabled

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