----boundary-LibPST-iamunique-1748618304_-_-
Content-type: text/plain
Andrew
Without testing, I guess that you need to
do something to ensure that your
"2 * MIN(INTEGER)"
is evaluated using 64 bits (LONGINTs).
The 'dirtiest' solution so far may be:
VAR
t, s : SET
BEGIN
t := {}; (* Essential *)
s := {31); (* Or whatever *)
RETURN SYSTEM.VAL (LONGINT, s) / 4294967295.
END;
This stuff is taking the 'convenience' of
SETs to the borders of sanity, if not beyond.
R
>> Hei All,
>>
>> ORD({31]) = MIN(INTEGER)
>>
>> ORD({0..31}) = -1
>>
>> etc if I remember right.
>>
>> Now in C a unsigned integer is used for sets. So in C {31}
>> regarded as an
>> unsigned integer has a different value from value to
>> ORD({31}) in CP.
>>
>> return( (double) y / (unsigned long) 0xffffffff) in C where
>> y is a set would
>> translate into something like
>>
>> int := ORD(y);
>> IF int < 0 THEN
>> RETURN (int - 2 * MIN(INTEGER)) / 4294967295
>> ELSE
>> RETURN int / 4294967295
>> END
>>
>> Andrew
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-1748618304_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXH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90aWZ5IHRoZSBzZW5kZXIuXHBhcg0KWW91IHNob3VsZCBub3QgY29w
eSBpdCBvciB1c2UgaXQgZm9yIGFueSBwdXJwb3NlIG5vciBkaXNjbG9zZSBvclxwYXINCmRpc3Ry
aWJ1dGUgaXRzIGNvbnRlbnRzIHRvIGFueSBvdGhlciBwZXJzb24uXHBhcg0KKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipc
cGFyDQpccGFyDQotLS0gQmxhY2tCb3hccGFyDQotLS0gc2VuZCBzdWJqZWN0IEhFTFAgb3IgVU5T
VUJTQ1JJQkUgdG8gYmxhY2tib3hAb2Jlcm9uLmNofX0ASGVpEMBsbIYsQA=
----boundary-LibPST-iamunique-1748618304_-_---
Received on Wed Mar 30 2005 - 15:16:14 UTC