[Oberon] Question about Oakwood guidelines and design choices

R. S. Doiel rsdoiel at gmail.com
Mon Jun 7 17:49:44 CEST 2021


Good Morning Jörg (and everyone else),

This is becoming clearer. Between evolution (originating in Texts of the 
Oberon system) and making a distinction of writing binary files versus 
plain text (versus Oberon's Texts) this makes sense. Where I am using 
"Out" in POSIX Oberon-7 code I'll stick with Oakwood.  Now I need to 
figure out which set of compilers I want to be compatible with in the 
POSIX setting.  I should probably implement similar modules in FGPA 
Oberon so that I can easily move between the two environments as well as 
POSIX systems. It's be a good exercise for me to understand the design 
choices.

I've really enjoyed Oberon language and increasingly the system. It's 
helped inspire new thinking for me in my day job.

All the best,

Robert

On 6/7/21 12:58 AM, Joerg wrote:
> Robert
>
> Since the invention of Out.Mod (book: Programming in Oberon, 1992)
> Out.Real had two parameters (r: REAL, n: INTEGER). This is because Out.Real(r, n) just calls Texts.WriteReal(W, r, n)
> For human output you specify the size of the field your result is right-aligned.
>
> Files.WriteReal(R: Rider, x: REAL) however is not for human output but machine output and just dumps the real in binary.
> "Just dumping" is not totally correct: The real is written in little endian. The file can be correctly transferred between systems with different endianness.
>
> br
> Jörg
>
> Am 06.06.21, 20:40 schrieb "Oberon im Auftrag von Robert Doiel" <oberon-bounces at lists.inf.ethz.ch im Auftrag von rsdoiel at gmail.com>:
>
>      Good Morning,
>
>      I was looking at the Oakwood Guidelines this morning trying to sort out
>      why an implementation of `Out.Real()` might only accept a single
>      parameter versus two (like `Out.Int()` ). The Oakwood guidelines I am
>      reading in PDF form are from Oct. 20, 1995 (URL
>      https://www.math.bas.bg/bantchev/place/oberon/oakwood-guidelines.pdf
>      downloaded on 2021-06-06) and indicate that two parameters are expected.
>
>      Next I looked at how the Oxford compiler implemented Out and saw that it
>      was a very thin wrapper on Files using STDOUT instead of a user supplied
>      file handle.  That makes complete sense to me, at least from a POSIX
>      point of view.  But Files WriteReal() in Oakwood on;y has one
>      parameter.  Does anyone know the history behind why Oakwood as to why
>      Out.Real() and Files.WriteReal() would be different?
>
>      I noticed in Native Oberon 2.3.6 that Files.WriteReal() does have two
>      parameters. Just curious to know the story behind the evolution from
>      1995 to Native Oberon 2.3.6.
>
>      All the best,
>
>      Robert Doiel
>
>      --
>      Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
>      https://lists.inf.ethz.ch/mailman/listinfo/oberon
>
>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon


More information about the Oberon mailing list