Re: [BLACKBOX] Trap while compiling SYSTEM.GET

From: [at]} <Robert>
Date: Wed, 9 May 2012 23:23:36 +0100

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

On 09/05/2012 19:27, Oleg N. Cher wrote:

> What is practical reason of using of code procedures with zero size?


I have written a couple of Modules to do unsigned integer arithmetic (32 & 64
bit - and some 128 bit!).

The 'lower' module is all small code procedures, the 'higher' one is CP using
the lower one. A zero byte example that converts from 64 bit to 32 bit is:

Code:

TYPE
   Cardinal = INTEGER;

   LongCard = LONGINT;


PROCEDURE [code] Low* (c : LongCard) : Cardinal; (* Least Sig Card *)


Docu:

PROCEDURE [code] Low (c: LongCard): Cardinal
Returns the lower 32 bits of c (ie c MOD 2?32).




Regards

Robert



PS - I know this design is not type safe as the compiler allows signed &
unsigned quantities to be mixed, but hey, its not a perfect world!


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-325228391_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fQ0Ke1xmNFxmc3dpc3NcZmNoYXJzZXQxMjggTVMgTWluY2hvO319DQp7XGNvbG9ydGJsXHJl
ZDBcZ3JlZW4wXGJsdWUwO1xyZWQwXGdyZWVuMFxibHVlMjU1O30NClx1YzFccGFyZFxwbGFpblxk
ZWZ0YWIzNjAgXGYwXGZzMjAgT24gMDkvMDUvMjAxMiAxOToyNywgT2xlZyBOLiBDaGVyIHdyb3Rl
OlxwYXINClxwYXINCj4gV2h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0KXHBhcg0KXHBhcg0KXHBhcg0KUFMgLSBJIGtub3cgdGhpcyBk
ZXNpZ24gaXMgbm90IHR5cGUgc2FmZSBhcyB0aGUgY29tcGlsZXIgYWxsb3dzIHNpZ25lZCAmIFxw
YXINCnVuc2lnbmVkIHF1YW50aXRpZXMgdG8gYmUgbWl4ZWQsIGJ1dCBoZXksIGl0cyBub3QgYSBw
ZXJmZWN0IHdvcmxkIVxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwg
c2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBM
SVNUUy5PQkVST04uQ0h9fQA+ICAg
----boundary-LibPST-iamunique-325228391_-_---
Received on Thu May 10 2012 - 00:23:36 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:03 UTC