home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / modula2 / 1432 < prev    next >
Encoding:
Text File  |  1992-11-22  |  1.4 KB  |  40 lines

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