My Cardinal is signed !
Posted on 2000-04-11
According to the Delphi 3 Help file, cardinals are meant to be a 32 bit unsigned number.
However it is definately a 32 bit signed number on my system. (WinNT)
Try typing '(cardinal($7FFFFFFF)+1)' in the 'evaluate/modify' window and you will get a range check error instead of the correct answer of $80000000.
Also Cardinal($FFFFFFFF) gives '-1'.
Q1. Is this unique to me or does everyone else have the same issue?
Q2. So how do I get a 32 bit unsigned number? (Simply printing it out differently at the end doesn't help, because the maths in the middle should be correct to)
(For example: $8000 0000 / 2 = ??
Signed: $C000 0000
Unsigned: $4000 0000)