[Oberon] Re (n): syntax in BB, CP, GPCP and V4 ...
Hans Klaver
hklaver at dds.nl
Wed Jul 26 00:46:00 CEST 2017
Dieter wrote:
> Just to remind you, that there exists a nice prettyprinter written by G. Feldmann, running on ETHOberon Windows plugin.
Thanks for the reminder, Dieter. Very usefull program by Günther Feldmann. Opens the possibility to publish Oberon sources in the style of the early Wirthian books Systematic Programming and Algorithms + Data Structures = Programs, i.e. with keywords in lower case boldface. I always liked the typography of those books published by Prentice-Hall!
By the way: Günther Feldmann uses a fifth indentation style (besides the four that I mentioned), which nicely shows the block structure of Oberon source code. This style also is completely consistent with regard to indentation of scope levels:
MODULE M; (* G. Feldmann, 'Block Style' *)
IMPORT Out;
VAR i, j: INTEGER;
PROCEDURE A*;
VAR i: INTEGER;
PROCEDURE B(VAR i, j: INTEGER);
VAR k: INTEGER;
BEGIN
k := i; i := j; j := k
END B;
BEGIN
i := 2; B(i, j)
END A;
PROCEDURE C*;
BEGIN
A; i := 2*j;
Out.Int(i, 5); Out.Int(j, 5); Out.Ln
END C;
END M.
--
Hans Klaver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20170726/df4e53ec/attachment.html>
More information about the Oberon
mailing list