Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!s.cc.purdue.edu!ags From: ags@s.cc.purdue.edu (Dave Seaman) Newsgroups: comp.lang.modula2 Subject: Re: Is this a compiler bug? Message-ID: <3843@s.cc.purdue.edu> Date: 3 Mar 89 15:21:50 GMT References: <1712@psu-cs.UUCP> Reply-To: ags@s.cc.purdue.edu (Dave Seaman) Organization: Purdue University Lines: 23 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". Correct. The first argument to INC must be a variable. The first argument that you specified is CARDINAL(code) which is not a variable. It's an expression. You may want to declare code as a variant record so that you can access it as any data type you want. Alternatively, you could use code := BITSET(CARDINAL(code)+1) to do what you want. -- Dave Seaman ags@j.cc.purdue.edu