[Oberon] Re (2): Resetting a file rider without creating a new stream.

Chris Burrows chris at cfbsoftware.com
Sun Apr 25 07:43:03 CEST 2021

> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> peter at easthope.ca
> Sent: Sunday, 25 April 2021 4:01 AM
> To: oberon at lists.inf.ethz.ch
> Subject: [Oberon] Re (2): Resetting a file rider without creating a new
> stream.
> ETH Oberon and the A2O here.  Streams lacks a Seek procedure.
> One further oddity: this Oberon has the procedure name OpenFileWriter but
> returns a stream rather than a FileStream.
> (** Opens a stream writing on file F starting at postion pos. *)
> 	PROCEDURE OpenFileWriter*(F: Files.File; pos: SIGNED32): Stream;
> Why not make it return a FileStream rather than a Stream?  That would
> changing the rider.

I also find the ETH Streams module confusing. The lack of documentation (or
difficulty in finding it) doesn't help. I would have expected Streams to be
an abstract class (including a Seek and a CanSeek similar to the A2
implementation) and FileStream to be defined in a separate module which
inherits from it. 

All of this is explained well (including a Stream example) in the book
"Object Oriented Programming in Oberon-2"


Chris Burrows
CFB Software

More information about the Oberon mailing list