[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gm2] VAR array parameter type compatibility
From: |
SiTex Graphics |
Subject: |
[Gm2] VAR array parameter type compatibility |
Date: |
Mon, 1 Feb 2010 16:07:44 -0500 |
Hi Gaius,
I have a case where GM2 appears to enforce different type
compatibility rules depending on whether a VAR array parameter is a
variable or the parameter in a procedure.
With
TYPE
fooADDRESS = ADDRESS;
VAR
foo : ARRAY [0..9] OF fooADDRESS;
GM2 accepts a call to
PROCEDURE DoAddress(VAR a : ARRAY OF ADDRESS)
passing foo. However, the following call produces a compiler error:
PROCEDURE DoFoo(VAR f : ARRAY OF fooADDRESS);
BEGIN
DoAddress(f);
END DoFoo;
"'f' cannot be passed to a VAR formal parameter"
Test code attached. Compile with
gm2 -fiso -c arraytype.mod
-Scott
arraytype.mod
Description: audio/mod