Re: incompatible assignement (POINTER TO LIMITED RECORD)

From: [at]} <HvL>
Date: Fri, 26 Oct 2007 16:05:31 +0200

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

I don't think so.
Assignment compatibility can only be allowed in cases, where the
structural identity of the variables is guaranteed forever, i. e.
statically; a dynamically enforced (type-)identity can of course not do
this.

H. v. L.

On Fri, 26 Oct 2007 15:44:15 +0200, Treutwein Bernhard
<Bernhard.Treutwein{([at]})nowhere.xy

> 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
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
> LISTSERV{([at]})nowhere.xy


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1527777672_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1x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XHBhcg0KPiBy
ZWdhcmRzXHBhcg0KPiAtLVxwYXINCj4gXHRhYiBCZXJuaGFyZCBUcmV1dHdlaW4sIEl1SywgUmVm
LiBJSUkgQSAzXHBhcg0KPiBcdGFiIEJlcm5oYXJkLlRyZXV0d2VpbihhdCl2ZXJ3YWx0dW5nIHVu
aS1tdWVuY2hlbiBkZVxwYXINCj5ccGFyDQo+XHBhcg0KPiAtLS0tXHBhcg0KPiBUbyB1bnN1YnNj
cmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byAgXHBh
cg0KPiBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0hccGFyDQpccGFyDQpccGFyDQotLS0tXHBhcg0K
VG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JP
WCIgdG8gTElTVFNFUlZATElTVFMuT0J9fQAAAAAAAAARAAAAMA=
----boundary-LibPST-iamunique-1527777672_-_---
Received on Fri Oct 26 2007 - 16:05:31 UTC

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