----boundary-LibPST-iamunique-808450025_-_-
Content-type: text/plain
Or even simpler ?
RETURN y / 4294967295.
Robert.
>>
>> I would say that the equivalent in CP for the C statement:
>>
>> return( (double) y / (unsigned long) 0xffffffff);
>>
>> Would be (assuming y is REAL):
>>
>> RETURN y / 0FFFFFFFFL;
>>
>> Note the L suffix to indicate that the constant should be
>> interpreted as a
>> LONGINT.
>>
>> Chris Burrows
>> CFB Software
>> http://www.cfbsoftware.com
>>
>> > -----Original Message-----
>> > From: blackbox{([at]})nowhere.xy>> > Behalf Of Andrew Thomas
>> > Sent: Tuesday, 29 March 2005 5:15 PM
>> > To: BlackBox Mailing List
>> > Subject: [BlackBox] - Bit operations in Component Pascal
>> >
>> > >
>> > > 2. What is the specific problem you have with the
>> return statement?
>> > >
>> >
>> > Hi Chris,
>> >
>> > the problem is that the divide is by MAX(unsigned integer)
>> >
>> > 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-808450025_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFxwYXINCk9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YXINCioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqXHBhcg0KXHBhcg0KLS0tIEJsYWNrQm94XHBhcg0KLS0tIHNlbmQgc3ViamVjdCBIRUxQ
IG9yIFVOU1VCU0NSSUJFIHRvIGJsYWNrYm94QG9iZXJvbi5jaH19AEFETUlOSVNUUkE
----boundary-LibPST-iamunique-808450025_-_---
Received on Wed Mar 30 2005 - 14:25:47 UTC