[Oberon] Oberon-07 expression0

Joerg joerg.straube at iaeth.ch
Sun Jun 21 13:19:38 CEST 2020


Tomas

The code you mentioned covers the IF in the following code sample:

IMPORT Math;
TYPE R = PROCEDURE(REAL): REAL;
VAR y, yDiff: R;

  IF y = Math.sin THEN yDiff := Math.cos END;

br
Jörg

> Am 21.06.2020 um 13:42 schrieb John R. Strohm <strohm at airmail.net>:
> 
> It appears that this is for comparisons.  The original code allowed comparisons of pointers.  The revised code appears to be intended to continue allowing comparisons of pointers, and add capability for comparison of procedure variables.
> 
> --- thomas.kral at email.cz wrote:
> 
> From: Tomas Kral <thomas.kral at email.cz>
> To: "Oberon at lists.inf.ethz.ch" <Oberon at lists.inf.ethz.ch>
> Subject: [Oberon] Oberon-07 expression0
> Date: Sun, 21 Jun 2020 11:52:24 +0200
> 
> Hi,
> 
> Looking at some history of `ORP' development, I spot a change in
> `expression0'
> 
> Cannot understand the code, applies to pointer assignments?
> Earlier only base or extended type assignments allowed, newer allows 
> also procs of the same signature assignment?
> 
> 
> from earlier
>      ELSIF (xf = ORB.Pointer) & (yf = ORB.Pointer) &
>          (IsExtension(x.type.base, y.type.base) OR IsExtension(y.type.base, x.type.base)) THEN
>        IF rel <= ORS.neq THEN ORG.IntRelation(rel,  x, y) ELSE ORS.Mark("only = or #") END
> 
> 
> to newer
>      ELSIF (xf = ORB.Pointer) & (yf = ORB.Pointer) &
>          (IsExtension(x.type.base, y.type.base) OR IsExtension(y.type.base, x.type.base))
>          OR (xf = ORB.Proc) & (yf = ORB.Proc) & EqualSignatures(x.type, y.type) THEN
>        IF rel <= ORS.neq THEN ORG.IntRelation(rel,  x, y) ELSE ORS.Mark("only = or #") END
> 
> Many thanks
> 
> -- 
> Tomas Kral <thomas.kral at email.cz>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
> 
> 
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list