home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.modula2
- Path: sparky!uunet!usc!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!chx400!bernina!neptune!templ
- From: templ@inf.ethz.ch (Josef Templ)
- Subject: Re: Oberon vs Modula-2
- Message-ID: <1992Nov22.125424.28252@neptune.inf.ethz.ch>
- Sender: templ@inf.ethz.ch
- Nntp-Posting-Host: lillian-gw
- Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH
- Date: Sun, 22 Nov 1992 12:54:24 GMT
- Lines: 28
-
- > MODULE t03;
- > TYPE c = RECORD a, b: INTEGER END;
- > PROCEDURE e;
- > TYPE b = POINTER TO c;
- > c = ARRAY 3 OF CHAR;
- > VAR p: b;
- > BEGIN (* e *)
- > p^[1] := "x";
- > END e;
- > END t03.
-
- S. Bevan writes
- > I'd call that more than an ambiguity. My _interpretation_ of the
- > rules (and the one I implemented) was that the above program was
- > invalid, but that if you switched the order of "b" and "c" it would be
- > valid. Is the above (jt) interpretation going to be made official at
- > some point?
-
- IMHO, our interpretations are exactly the same.
- It is the interpretation that evolves naturally from "single pass compilation".
- Unfortunately, the current report allows a different interpretation
- because it does not restrict the forward declaration rule to
- forward declarations. In this sense, the report is ambigous.
- It does not specify which c is to be taken as the pointer base type.
- If you switch b and c, there is no ambiguity even in the current report.
-
- - Josef Templ
- the usual disclaimer applies
-