Re: Welcome

From: [at]} <Gérard>
Date: Fri, 26 Oct 2007 15:19:01 +0200

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

info{([at]})nowhere.xy
>> -----Original Message-----
>> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>> Campbell, Robert D (SELEX) (UK Edinburgh)
>> Sent: Friday, 26 October 2007 6:14 PM
>> To: BLACKBOX{([at]})nowhere.xy
>> Subject: Re: Welcome
>>
>> Hi
>>
>> Am I missing something, or is this an error?
>>
>> The code below does not compile, but if I remove
>> the word 'LIMITED' it does. I thought that LIMITED records were not
>> limited in their defining module.
>>
>>
>> Cheers
>>
>> Robert
>>
>>
>>
>> MODULE DemoTest;
>>
>> TYPE
>> Ball* = POINTER TO LIMITED RECORD
>> radius : REAL
>> END;
>>
>> PROCEDURE Copy* (a : Ball) : Ball;
>> VAR
>> b : Ball;
>> BEGIN
>> NEW (b); b^ := a^; RETURN b
>> END Copy;
>>
>> END DemoTest.
>>
>>
>
> Looks like an error to me.
>
> b.radius := a.radius
>
> which does compile, has the same end result in this example.
>
> Regards,
> Chris Burrows
>
> CFB Software
> http://www.cfbsoftware.com/gpcp
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
>
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.

Cheers,

Gérard


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1532721863_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hh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T
VFNFUlZATElTVFMuT0JFUk9OLkNIXHBhcg0KPiAgIFxwYXINClRoaXMgcHJvYmxlbSBpcyBub3Qg
bGltaXRlZCB0by4uLiBMSU1JVEVEIHJlY29yZHMuIEl0J3MganVzdCB0aGF0IGFeIGFuZCBccGFy
DQpiXiBhcmUgbm90IGFzc2lnbm1lbnQgY29tcGF0aWJsZS4gQXMgJ2EnIG1heSBiZSBhbiBleHRl
bnNpb24gb2YgJ2InIChhdCBccGFyDQpsZWFzdCBpbiB0aGVvcnksIGJ1dCBJIHN1cHBvc2UgdGhl
IGNvbXBpbGVyIGRvZXNuJ3QgdmVyaWZ5IHRoaXMgcG9pbnQpLCBccGFyDQonYV4nIG1heSBiZSBi
aWdnZXIgdGhhbiAnYl4nLCBzbyB0aGF0IHRoZSBhc3NpZ25tZW50IGlzIGltcG9zc2libGUuXHBh
cg0KSWYgeW91IHJlbW92ZSB0aGUgd29yZCAnTElNSVRFRCcsIHRoZXJlIG1heSBiZSBubyBleHRl
bnNpb24gb2YgJ0JhbGwnLCBccGFyDQphbmQgdGhlIHByb2JsZW0gdmFuaXNoZXMuXHBhcg0KXHBh
cg0KQ2hlZXJzLFxwYXINClxwYXINCkdcJ2U5cmFyZFxwYXINClxwYXINClxwYXINCi0tLS1ccGFy
DQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNL
Qk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04ufX0AQn19AApE
----boundary-LibPST-iamunique-1532721863_-_---
Received on Fri Oct 26 2007 - 15:19:01 UTC

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