(unknown charset) - Problem with pointer semantics

From: (unknown charset) unknown charset) Сергей Губанов <">
Date: Tue, 20 Jun 2006 11:00:09 +0400


What about this?

TYPE Array = ARRAY 2 OF INTEGER;
VAR a, b: POINTER TO Array;

b^ := a^; (* value copy *)
b := a; (* pointer copy *)


2006/6/19, Rex Couture <rex{([at]})nowhere.xy

> VAR
> a, b: POINTER TO ARRAY OF INTEGER;
> x, y: ARRAY 2 OF INTEGER;
>
> NEW( a, 2); NEW( b, 2);
> a[1]:= 1; b[1]:= 2;
> x[1]:= 1; y[1]:= 2;
>
> b:= a;
> y:= x; (* not an equivalent statement *)
>






Received on Tue Jun 20 2006 - 09:00:09 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:50 UTC