Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-crg!ames!sri-spam!sri-unix!hplabs!cae780!tektronix!uw-beaver!tikal!bobc
From: bobc@tikal.UUCP (Bob Campbell)
Newsgroups: comp.lang.modula2
Subject: Re: Ambiguity?
Message-ID: <578@tikal.UUCP>
Date: Thu, 11-Dec-86 19:41:02 EST
Article-I.D.: tikal.578
Posted: Thu Dec 11 19:41:02 1986
Date-Received: Mon, 15-Dec-86 07:05:24 EST
References: <4839@ism780c.UUCP>
Reply-To: bobc@tikal.UUCP (Bob Campbell)
Distribution: net
Organization: Teltone Corp., Kirkland, WA
Lines: 32

In article <4839@ism780c.UUCP> darryl@ism780c.UUCP (Darryl Richman) writes:
>...VAL(POINTER TO ..., Foo)...;
>How does the compiler decide whether "Foo" in this position denotes a
>PROCEDURE or the INTEGER returned from an invocation of Foo?
....
>P.S.  The implementation I use, from Wirth's group, has an "implementation
>restriction" and requires that I include the empty argument list when I want
>an invocation. 

It was my understanding that it is not a implementation restriction
which required the empty parameter list, but instead a design feature
of the language that all function calls must have a parameter list.
(This is just like "C" except that "C" requires a empty argment list
for any invocation even non functions).  Wirth's EBNF syntax for the
language does not show this, but there are some other things it does
not show also.  I suppect that in combining PROCEDURES and FUNCTIONS
into one syntax that a restriction that required a argument list was
left out.

I may be wrong, but I have never seen a modula-2 compiler which
allowed:

PROCEDURE x:INTEGER;
....

Bob Campbell
Teltone Corporation		18520 - 66th AVE NE
P.O. Box 657			Seattle, WA 98155
Kirkland, WA 98033

{amc,dataio,fluke,hplsla,sunup,uw-beaver}!tikal!bobc
bobc@tikal.teltone.com