gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] A SET error, perhaps?


From: John O Goyo
Subject: [Gm2] A SET error, perhaps?
Date: Thu, 16 Mar 2006 14:00:10 -0500
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Greetings:

I believe the following to be correct (and compiles with GPM and XDS). I threw in HALT so as to have some sort of conditional without importing anything.

=========================================
MODULE bits;

TYPE
  Colour = SET OF (red, green, blue);

VAR
  sky, land :Colour;

BEGIN
  sky := Colour{red, blue};
  land := Colour{green};

  IF land <= sky THEN
     HALT
  END (*IF*)

END bits.
=========================================

Gm2 begs to differ:

% gm2 -c bits.mod
bits.mod:4:symbol (Colour) is already declared in this scope, use a different name or remove the declaration
bits.mod:4:and symbol (Colour) is also declared here

Please advise.

Sincerely,
john




reply via email to

[Prev in Thread] Current Thread [Next in Thread]