🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #4691

Re: Is this a compiler bug?

#4691
From: Aubrey McIntosh
Date: Fri, 03 Mar 1989 19:48
23 lines
1208 bytes
In article <1712@psu-cs.UUCP> bartonr@psu-cs.UUCP (Robert Barton) writes:
>Now the problem: using the statement
>
>  INC(CARDINAL(code), 1);
>
>the compiler gives an error message of "variable expected".  

The compilers I have used call CARDINAL() a function;  they then get difficult
about not allowing assignments to function values.  I spent a long time chasing
this one down.  

A similar one that bits me is:
  VAR v1 : recPtr;
  ...
           recPtr( cardinalvariable ) ^ := expression
I still don't know why I can't dereference a pointer function type, but it  
seems to be forbidden.


-- 
--------------------------------------------------------------
a Modula-2 house...      1-(512)-346-5781 (v)
Austin, TX 78759         ...!cs.utexas.edu!oakhill!val!aubrey
Technical Details
Message-ID: <291@val.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!oakhill!val!aubrey
References: <1712@psu-cs.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!oakhill!val!aubrey
From: aubrey@val.UUCP (Aubrey McIntosh)
Newsgroups: comp.lang.modula2
Subject: Re: Is this a compiler bug?
Message-ID: <291@val.UUCP>
Date: 3 Mar 89 19:48:41 GMT
References: <1712@psu-cs.UUCP>
Reply-To: aubrey@val.UUCP (Aubrey McIntosh)
Organization: Video Associates Labs - Austin, Tx
Lines: 23