[Oberon] VAR params at the call site [WAS: Re: Micron is a modern Oberon with the power of C]

Paul Reed paulreed at paddedcell.com
Mon Nov 9 16:44:59 CET 2026


On 2026-11-08 17:22, Rochus Keller wrote:
> "Sorter.Sort(@a,.." shows at the call site that a may change, which you 
> don't see with a VAR param.

Agreed - one of my own dialects of Oberon requires VAR in the place of 
the call as well, because coming from C/C++ I didn't like not seeing 
that it was a VAR param. I have things like:

   ...
   Texts.WriteString(VAR W, "Hello"); Texts.WriteLn(VAR W); 
Texts.Append(Oberon.Log, W.buf);
   ...

so I can see more easily what are pointers and what are VAR params.

A command-line switch relaxes the VAR requirement, e.g. in order to 
compile Project Oberon code.

Cheers
Paul


More information about the Oberon mailing list