comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.
Date: Fri, 2 Jul 2021 13:57:30 -0700 (PDT)	[thread overview]
Message-ID: <dc31d424-9528-4bae-9b7a-1ff379a9945cn@googlegroups.com> (raw)
In-Reply-To: <68f867d3-2b83-4092-a33e-0fcc78f5a24bn@googlegroups.com>

On Sunday, June 27, 2021 at 1:33:28 PM UTC-6, daniel wrote:
> How I can make _indexed_ stream file Input/Output ? 
> 
> For 'indexed' i mean manually setting file position: 
> => 'from' in $type'input() and 
> => 'to' in $type'output() 
> 
> Actually I use Ada.Streams.Stream_IO. 
> 
> My main need is examples. 
> 
> Thanks! 
> Best Whishes, 
> Dani.

Streams are a bit different than files; you see, streams are an abstraction on input/output and therefore different than files. Consider, for example, an output stream that controls a radio transmitter. There's no possible way to "unsend" the data: it's a write-only device.

If you're using Ada's standard library, with the XXX_IO packages, I believe what you want is Ada.Direct_IO.

  parent reply	other threads:[~2021-07-02 20:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-27 19:33 Hi! How I can make _indexed_ stream file Input/Output ? Thanks Daniel Norte Moraes
2021-06-28  1:36 ` Dennis Lee Bieber
2021-07-02 20:57 ` Shark8 [this message]
2021-07-05  4:06   ` zac brown
2021-07-05  4:06     ` zac brown
replies disabled

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