[fpc-pascal] Strange message about mixed signed expression
Florian Klämpfl
florian at freepascal.org
Wed Jan 22 19:27:57 CET 2014
Am 22.01.2014 19:00, schrieb Jürgen Hestermann:
>
> Am 2014-01-22 07:41, schrieb leledumbo:
>> Jürgen Hestermann wrote
>>> Realy?
>>> But why that?
>>> It cannot be negative.
>>> Using integer instead of unsigned values reduces the possible (positive)
>>> range
>>> and produces such illogical (to me) compiler warnings.
>> Delphi compatibility and maximum data size limitation AFAIK (2 GB).
>>
>
> Sigh... all the bad things in FPC crept in from Delphi it seems...
... which is not true in this case.
- The unsigned types are something very unpascalish.
- Extended Pascal defines the result of length as integer
- Expressions like length(s)-1 are very common and would cause a lot of
trouble if length(s) would be unsigned.
>
> Why did they artifically limit the max number of array elements to 2^31when
> it would have been very easy to have a maximum of 2^32 instead?
It is even easier to use a 64 bit OS in this case. Even more having a
data segment >2 GB might be a problem for 32 Bit OSes.
More information about the fpc-pascal
mailing list