Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!tektronix!reed!psu-cs!bartonr From: bartonr@psu-cs.UUCP (Robert Barton) Newsgroups: comp.lang.modula2 Subject: Is this a compiler bug? Message-ID: <1712@psu-cs.UUCP> Date: 2 Mar 89 05:41:42 GMT Reply-To: bartonr@psu-cs.UUCP (Robert Barton) Organization: Dept. of Computer Science, Portland State University; Portland OR Lines: 19 I have a variable, called code, representing a word of machine code which consists of one or more bit fields of various sizes. Since I will be doing a number of bit manipulation operations on this variable it has been declared with type BITSET. However for testing purposes it will be useful to assign code various values within a given range using a loop. Now the problem: using the statement INC(CARDINAL(code), 1); the compiler gives an error message of "variable expected". Does this sound like a compiler bug or an error on my part? The references I have read indicate that INC should take any ordinal type, including CARDINAL. BITSET and CARDINAL are both 16 bits in this implementation. Using code := BITSET(CARDINAL(code) + 1); is acceptable to the compiler, so I can work around it, but I'm just wondering if anyone else has come across this.