gm2
[Top][All Lists]
Advanced

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

[Gm2] Array and CAST Woes


From: john o goyo
Subject: [Gm2] Array and CAST Woes
Date: Fri, 10 Jun 2005 07:06:12 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

Greetings:

I offer the following report.

------------------------------------------------------------
1. Array indices:

Methinks that the following is correct code but gm2 claims
otherwise.

===[index.mod]===
MODULE index;

TYPE
    A = ARRAY [0..1] OF CHAR;
VAR
    a :ARRAY [0..1] OF A;

BEGIN (*index*)
    a[0,0] := 'A'  (* Reported as error by GM2 of 2005-06-03 *)
END index.
===[index.mod ends]===


------------------------------------------------------------
2. CASTing woes:

Is the following not valid?

===[cast.mod]===
MODULE cast;

FROM (*ISO*) SYSTEM IMPORT CAST, LOC;

VAR
    x :LOC;
    n :CARDINAL;

BEGIN (*cast*)
    n := 2;
    x := CAST(LOC, n)  (* Reported as error by GM2 of 2005-06-03 *)
END cast.
===[cast.mod ends]===

------------------------------------------------------------

Sincerely,
john



reply via email to

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