🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #4692

Re: Is this a compiler bug?

#4692
From: joel
Date: Fri, 03 Mar 1989 21:39
15 lines
1084 bytes
INC(CARDINAL(code), 1);

is not accepted by most Modula-2 compilers, because ``CARDINAL(code)'' is an
expression (an r-value, for those conversant with C's description) rather than
a variable (an l-value).  INC effectively takes a VAR parameter, so insists
upon having a variable.

I don't consider the cast to really be an expression.  I see it as a type
conversion which is more properly seen as a viewpoint change rather than a
computation.  I therefore consider this a silly restriction, and done
something about it in the Modula-2 compiler I maintain.  But it certainly
isn't standard.

 Joel McCormack
Technical Details
Message-ID: <8903032139.AA00466@gilroy.pa.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!WSL.DEC.COM!joel
References: <INFO-M2%89030309052136@UCF1VM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!WSL.DEC.COM!joel
From: joel@WSL.DEC.COM
Newsgroups: comp.lang.modula2
Subject: Re: Is this a compiler bug?
Message-ID: <8903032139.AA00466@gilroy.pa.dec.com>
Date: 3 Mar 89 21:39:18 GMT
References: <INFO-M2%89030309052136@UCF1VM>
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: Modula2 List <INFO-M2%UCF1VM.bitnet@jade.berkeley.edu>
Organization: The Internet
Lines: 15