Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

129 views
Skip to first unread message

Daniel Norte Moraes

unread,
Jun 27, 2021, 3:33:28 PM6/27/21
to
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.

Shark8

unread,
Jul 2, 2021, 4:57:31 PM7/2/21
to
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.

zac brown

unread,
Jul 5, 2021, 12:06:36 AM7/5/21
to

zac brown

unread,
Jul 5, 2021, 12:06:58 AM7/5/21
to
0 new messages