RE: incompatible assignement (POINTER TO LIMITED RECORD)

From: null <">
Date: Fri, 26 Oct 2007 13:44:15 +0000

----boundary-LibPST-iamunique-1511430247_-_-
Content-type: text/plain

Gerald writes:

[...]
> This problem is not limited to... LIMITED records.
> It's just that a^ and b^ are not assignment compatible.
> As 'a' may be an extension of 'b' (at least in theory,
> but I suppose the compiler doesn't verify this point),
> 'a^' may be bigger than 'b^', so that the assignment is
> impossible. If you remove the word 'LIMITED', there may
> be no extension of 'Ball', and the problem vanishes.

so I tried:

        b^ := a(Ball)^;

but that yields also: "incompatible assignment" although the
report says (in Sec. 8.1):


> A type guard v(T) asserts that the dynamic type of
> v is T (or an extension of T), i.e., program execution is
> aborted, if the dynamic type of v is not T (or an extension
> of T). Within the designator, v is then regarded as having
> the static type T.

which implies to me that the assignment should be possible.

regards
--
	Bernhard Treutwein, IuK, Ref. III A 3
	Bernhard.Treutwein(at)verwaltung uni-muenchen de
----boundary-LibPST-iamunique-1511430247_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEdlcmFsZCB3cml0ZXM6XHBhcg0KXHBhcg0KWy4u
Ll1ccGFyDQo+IFRoaXMgcHJvYmxlbSBpcyBub3QgbGltaXRlZCB0by4uLiBMSU1JVEVEIHJlY29y
ZHMuIFxwYXINCj4gS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HYgaXMgdGhl
biByZWdhcmRlZCBhcyBoYXZpbmcgXHBhcg0KPiB0aGUgc3RhdGljIHR5cGUgVC5ccGFyDQpccGFy
DQp3aGljaCBpbXBsaWVzIHRvIG1lIHRoYXQgdGhlIGFzc2lnbm1lbnQgc2hvdWxkIGJlIHBvc3Np
YmxlLlxwYXINClxwYXINCnJlZ2FyZHNccGFyDQotLVxwYXINClx0YWIgQmVybmhhcmQgVHJldXR3
ZWluLCBJdUssIFJlZi4gSUlJIEEgM1xwYXINClx0YWIgQmVybmhhcmQuVHJldXR3ZWluKGF0KXZl
cndhbHR1bmcgdW5pLW11ZW5jaGVuIGRlfX0AYShpfgDAQhAatA==
----boundary-LibPST-iamunique-1511430247_-_---
Received on Fri Oct 26 2007 - 15:44:15 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:13 UTC