gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] VAR array parameter type compatibility


From: Gaius Mulley
Subject: Re: [Gm2] VAR array parameter type compatibility
Date: Fri, 26 Feb 2010 15:21:50 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

SiTex Graphics <address@hidden> writes:

> 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

Hi Scott,

now fixed in the latest cvs - many thanks for the test code and bug
report,

regards,
Gaius




reply via email to

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