Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

USENET would be a better laboratory if there were more labor and less oratory. -- Elizabeth Haley


devel / comp.lang.ada / Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.

SubjectAuthor
* Hi! How I can make _indexed_ stream file Input/Output ? Thanks.Daniel Norte Moraes
+- Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.Dennis Lee Bieber
`* Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.Shark8
 `* Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.zac brown
  `- Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.zac brown

1
Hi! How I can make _indexed_ stream file Input/Output ? Thanks.

<68f867d3-2b83-4092-a33e-0fcc78f5a24bn@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5474&group=comp.lang.ada#5474

 copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:6214:b26:: with SMTP id w6mr22154137qvj.61.1624822407634;
Sun, 27 Jun 2021 12:33:27 -0700 (PDT)
X-Received: by 2002:a25:ca8b:: with SMTP id a133mr26234961ybg.173.1624822407379;
Sun, 27 Jun 2021 12:33:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 27 Jun 2021 12:33:27 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2804:14c:4c1:b99c:1b38:ebd3:db1a:39d0;
posting-account=wgmHdgoAAAA-F7JItPEZjeXqFc0KdzEQ
NNTP-Posting-Host: 2804:14c:4c1:b99c:1b38:ebd3:db1a:39d0
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <68f867d3-2b83-4092-a33e-0fcc78f5a24bn@googlegroups.com>
Subject: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.
From: danielch...@gmail.com (Daniel Norte Moraes)
Injection-Date: Sun, 27 Jun 2021 19:33:27 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Daniel Norte Moraes - Sun, 27 Jun 2021 19:33 UTC

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.

Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.

<b29idg9eknu35725n3emp42omi3n429s6u@4ax.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5475&group=comp.lang.ada#5475

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 27 Jun 2021 20:36:29 -0500
From: wlfr...@ix.netcom.com (Dennis Lee Bieber)
Newsgroups: comp.lang.ada
Subject: Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.
Date: Sun, 27 Jun 2021 21:36:29 -0400
Organization: IISS Elusive Unicorn
Message-ID: <b29idg9eknu35725n3emp42omi3n429s6u@4ax.com>
References: <68f867d3-2b83-4092-a33e-0fcc78f5a24bn@googlegroups.com>
User-Agent: ForteAgent/8.00.32.1272
X-No-Archive: YES
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 66
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-yoi71hk6UH8LpLvGA9wquv0mI4P5LSZpqUkW/T5LVN1SjVDb5NL+kYUN9+mFGhQQVKtUGEBaIPh/TEF!RAQcj7WnnFj3kDM1jdGY2VWXs+T2NtTEy/4o1qQ2iF84XM9NM+ZBlt/L8ruVD+SUqln2G0mC
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 4202
 by: Dennis Lee Bieber - Mon, 28 Jun 2021 01:36 UTC

On Sun, 27 Jun 2021 12:33:27 -0700 (PDT), Daniel Norte Moraes
<danielcheagle@gmail.com> declaimed the following:

>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.
>

What part of
https://www.adaic.org/resources/add_content/standards/05aarm/html/AA-A-12-1.html
is lacking?

"""
21 -- Operations on position within file
22 procedure Set_Index(File : in File_Type; To : in Positive_Count);
23 function Index(File : in File_Type) return Positive_Count;
function Size (File : in File_Type) return Count;
"""
"""
31/1 {8652/0055} {AI95-00026-01} The Index function returns the current
file index, as a count (in stream elements) from the beginning of the file.
The position of the first element in the file is 1.
31.a/1 This paragraph was deleted.Ramification: The notion of Index for
Stream_IO is analogous to that of Index in Direct_IO, except that the
former is measured in Stream_Element units, whereas the latter is in terms
of Element_Type values.
32 The Set_Index procedure sets the current index to the specified
value.
32.1/1 {8652/0055} {AI95-00026-01} If positioning is supported for the
external file, the current index is maintained as follows:
32.2/1 {8652/0055} {AI95-00026-01} For Open and Create, if the Mode
parameter is Append_File, the current index is set to the current size of
the file plus one; otherwise, the current index is set to one.
32.3/1 {8652/0055} {AI95-00026-01} For Reset, if the Mode parameter is
Append_File, or no Mode parameter is given and the current mode is
Append_File, the current index is set to the current size of the file plus
one; otherwise, the current index is set to one.
"""
"""
33 If positioning is not supported for the given file, then a call of
Index or Set_Index propagates Use_Error. Similarly, a call of Read or Write
with a Positive_Count parameter propagates Use_Error.
33.a/2 Implementation Note: {AI95-00085-01} It is permissible for an
implementation to implement mode Append_File using the Unix append mode
(the O_APPEND bit). Such an implementation does not support positioning
when the mode is Append_File, and therefore the operations listed above
must raise Use_Error. This is acceptable as there is no requirement that
any particular file support positioning; therefore it is acceptable that a
file support positioning when opened with mode Out_File, and the same file
not support positioning when opened with mode Append_File. But it is not
acceptable for a file to support positioning (by allowing the above
operations), but to do something other than the defined semantics (that is,
always write at the end, even when explicitly commanded to write somewhere
else).
"""

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.

<dc31d424-9528-4bae-9b7a-1ff379a9945cn@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5499&group=comp.lang.ada#5499

 copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:a111:: with SMTP id k17mr1739920qke.496.1625259451012;
Fri, 02 Jul 2021 13:57:31 -0700 (PDT)
X-Received: by 2002:a5b:58e:: with SMTP id l14mr1724038ybp.303.1625259450838;
Fri, 02 Jul 2021 13:57:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.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: Fri, 2 Jul 2021 13:57:30 -0700 (PDT)
In-Reply-To: <68f867d3-2b83-4092-a33e-0fcc78f5a24bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC
NNTP-Posting-Host: 146.5.2.231
References: <68f867d3-2b83-4092-a33e-0fcc78f5a24bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dc31d424-9528-4bae-9b7a-1ff379a9945cn@googlegroups.com>
Subject: Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.
From: onewinge...@gmail.com (Shark8)
Injection-Date: Fri, 02 Jul 2021 20:57:31 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 22
 by: Shark8 - Fri, 2 Jul 2021 20:57 UTC

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.

Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.

<9f034eef-dc90-4c92-be32-41be4ba1c302n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5512&group=comp.lang.ada#5512

 copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:13c4:: with SMTP id i4mr5492368qtj.136.1625457995956; Sun, 04 Jul 2021 21:06:35 -0700 (PDT)
X-Received: by 2002:a25:6b0c:: with SMTP id g12mr10128406ybc.303.1625457995722; Sun, 04 Jul 2021 21:06:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!tr1.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:35 -0700 (PDT)
In-Reply-To: <dc31d424-9528-4bae-9b7a-1ff379a9945cn@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> <dc31d424-9528-4bae-9b7a-1ff379a9945cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9f034eef-dc90-4c92-be32-41be4ba1c302n@googlegroups.com>
Subject: Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.
From: zacbrown...@gmail.com (zac brown)
Injection-Date: Mon, 05 Jul 2021 04:06:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 21
 by: zac brown - Mon, 5 Jul 2021 04:06 UTC

On Saturday, July 3, 2021 at 6:57:31 AM UTC+10, Shark8 wrote:
> 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.

Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.

<dca2cef8-1366-4941-a273-a82dcdcec846n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5513&group=comp.lang.ada#5513

 copy link   Newsgroups: comp.lang.ada
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: i2pn2.org!i2pn.org!paganini.bofh.team!usenet.pasdenom.info!usenet-fr.net!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!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>
<dc31d424-9528-4bae-9b7a-1ff379a9945cn@googlegroups.com> <9f034eef-dc90-4c92-be32-41be4ba1c302n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dca2cef8-1366-4941-a273-a82dcdcec846n@googlegroups.com>
Subject: Re: Hi! How I can make _indexed_ stream file Input/Output ? Thanks.
From: zacbrown...@gmail.com (zac brown)
Injection-Date: Mon, 05 Jul 2021 04:06:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: zac brown - Mon, 5 Jul 2021 04:06 UTC

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:
> > 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.

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor