Article View: comp.lang.modula2
Article #1937Re: Two Oberon questionsREAD/NEW/FOLLOWUP
From: eepjm
Date: Mon, 15 Apr 1991 04:33
Date: Mon, 15 Apr 1991 04:33
29 lines
1951 bytes
1951 bytes
In article <1991Apr12.104304.4194@jyu.fi>, sakkinen@jyu.fi (Markku Sakkinen)
writes:
> ...
> Second question:
> Can function procedures in Oberon return structured values?
> In Modula-2 they cannot, but in Modula-3 this defect has been corrected.
> Again, the language definition carefully avoids saying anything
> (which would imply "yes"), but neither is this mentioned as a difference
> from Modula-2 (which would imply "no").
For some time now I have been telling my students that Modula-2 removed the
rather pointless Pascal restriction on the type of a function result. I
based this claim on two observations:
(a) the M-2 compiler which I use does allow structured values to be
returned;
(b) Wirth's books on the subject avoid saying anything about it (which, as
above, implies "yes").
Am I wrong? If so, to whom do I complain? Surely we don't have to go back
to forcing M-2 programmers to memorise the totally artifical distinction
between "structured" and "unstructured".
Peter Moylan eepjm@cc.newcastle.edu.au
P.S. (Totally different topic, but while I think of it .... Does the
emerging Modula-2 standard say how to declare a structured constant?
This is something which definitely needs standardising : most
compiler writers recognise that there must be a facility to declare,
for example, an array of constants, but so far this feature has not
been portable.)
Technical Details
Message-ID:
<1991Apr15.143313.9980@cc.newcastle.edu.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!seagoon.newcastle.edu.au!cc.newcastle.edu.au!eepjmReferences:
<1991Apr12.104304.4194@jyu.fi>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!seagoon.newcastle.edu.au!cc.newcastle.edu.au!eepjm From: eepjm@cc.newcastle.edu.au Newsgroups: comp.lang.modula2,comp.lang.modula3 Subject: Re: Two Oberon questionsREAD/NEW/FOLLOWUP Message-ID: <1991Apr15.143313.9980@cc.newcastle.edu.au> Date: 15 Apr 91 04:33:11 GMT References: <1991Apr12.104304.4194@jyu.fi> Organization: University of Newcastle, AUSTRALIA Lines: 29