comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: set_index and and end_of_file with just a stream reference
Date: Sat, 20 Feb 2021 21:41:06 +0000	[thread overview]
Message-ID: <ly1rdamn7x.fsf@pushface.org> (raw)
In-Reply-To: a135e4e9-9e51-4b57-ace7-f3cc930b7973n@googlegroups.com

Mehdi Saada <00120260a@gmail.com> writes:

> Okay :-)
> what I wanted is:
> I read an acronyme in the stream file, if good I input the adjacent
> record type, otherwise I would advance on the stream until the next
> acronyme with set_index(stream_access, index(stream_access) +
> composite_type_stream_size) and read the next acronyme
> (unbounded_string).
> Now I just input both objects and verify the acronyme.
> But I don't like writing an object that maybe won't be used.

Unless your objects are megabytes in size, I'd strongly suggest you just
read the thing in anyway. It'd stand a chance of working, then you can
benchmark and see whether it needs improvement.

I thought you wanted to manage concurrent access to this stream? in
which case you're going to need to read the tag and the object together,
even if it turns out you don't need the object after all.

  reply	other threads:[~2021-02-20 21:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-20 15:26 set_index and and end_of_file with just a stream reference Mehdi Saada
2021-02-20 15:35 ` Mehdi Saada
2021-02-20 16:01   ` Simon Wright
2021-02-20 16:04 ` Dmitry A. Kazakov
2021-02-20 16:22   ` Mehdi Saada
2021-02-20 16:30     ` Mehdi Saada
2021-02-20 17:59       ` Dmitry A. Kazakov
2021-02-20 19:08         ` Mehdi Saada
2021-02-20 21:41           ` Simon Wright [this message]
2021-02-21  0:22           ` Dmitry A. Kazakov
2021-02-23 17:21           ` Shark8
2021-02-23 17:56           ` J-P. Rosen
2021-02-20 17:52     ` Dmitry A. Kazakov
2021-02-21  1:56   ` Randy Brukardt
replies disabled

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