From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.4 required=3.0 tests=BAYES_05,FREEMAIL_FROM, PLING_QUERY autolearn=no autolearn_force=no version=3.4.6 X-Received: by 2002:a0c:be85:: with SMTP id n5mr11275614qvi.59.1625458017998; Sun, 04 Jul 2021 21:06:57 -0700 (PDT) X-Received: by 2002:a25:afcd:: with SMTP id d13mr14886826ybj.504.1625458017837; Sun, 04 Jul 2021 21:06:57 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 4 Jul 2021 21:06:57 -0700 (PDT) In-Reply-To: <9f034eef-dc90-4c92-be32-41be4ba1c302n@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=61.69.15.22; posting-account=T9GwWwoAAAALArU4XivrMQWjmQbLkZdV NNTP-Posting-Host: 61.69.15.22 References: <68f867d3-2b83-4092-a33e-0fcc78f5a24bn@googlegroups.com> <9f034eef-dc90-4c92-be32-41be4ba1c302n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks. From: zac brown Injection-Date: Mon, 05 Jul 2021 04:06:57 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62331 List-Id: On Monday, July 5, 2021 at 2:06:36 PM UTC+10, zac brown wrote: > On Saturday, July 3, 2021 at 6:57:31 AM UTC+10, Shark8 wrote:=20 > > On Sunday, June 27, 2021 at 1:33:28 PM UTC-6, daniel wrote:=20 > > > How I can make _indexed_ stream file Input/Output ?=20 > > >=20 > > > For 'indexed' i mean manually setting file position:=20 > > > =3D> 'from' in $type'input() and=20 > > > =3D> 'to' in $type'output()=20 > > >=20 > > > Actually I use Ada.Streams.Stream_IO.=20 > > >=20 > > > My main need is examples.=20 > > >=20 > > > Thanks!=20 > > > Best Whishes,=20 > > > Dani.=20 > > Streams are a bit different than files; you see, streams are an abstrac= tion on input/output and therefore different than files. Consider, for exam= ple, an output stream that controls a radio transmitter. There's no possibl= e way to "unsend" the data: it's a write-only device.=20 > >=20 > > If you're using Ada's standard library, with the XXX_IO packages, I bel= ieve what you want is Ada.Direct_IO.