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: Thu, 25 Feb 2010 17:30:55 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Fischlin Andreas <address@hidden> writes:

> Hi all,
>
> I agree, this compatibility should actually work and the compiler
> should accept types which have been made equal. Other examples are:
>
> TYPE
>       MYSHORTREAL = REAL;
>
> TYPE
>       PROCA = PROCEDURE (VAR ARRAY OF REAL);
>       PROCB = PROCEDURE (VAR ARRAY OF MYSHORTREAL);
>
> VAR
>       pa: PROCA; pb: PROCB;
>         x: ARRAY [0..1] OF REAL;
>         y: ARRAY [0..1] OF MYSHORTREAL;
>
> PROCEDURE ProcA(VAR z: ARRAY OF REAL);
> PROCEDURE ProcB(VAR z: ARRAY OF MYSHORTREAL);
>
> then pa and pb should be type compatible and interchangeably usable,
> i.e. all following statements should all be legal:
>
>       x := y;
>       pa := ProcA; pb := ProcB;
>       pa(x); pa(y); pb(x); pb(y);
>       pa := ProcB; pb := ProcA;
>       pa(x); pa(y); pb(x); pb(y);
>
>       
> Regards,
> Andreas

Hi Andreas,

indeed this passes on gm2,

regards,
Gaius




reply via email to

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