[fpc-pascal] Strange message about mixed signed expression
waldo kitty
wkitty42 at windstream.net
Wed Jan 22 22:47:33 CET 2014
On 1/22/2014 1:00 PM, Jürgen Hestermann wrote:
>
> 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...
it goes back much further than that... IIRC, Turbo Pascal was the first to
introduce the string type... i don't remember if it was in TP1 or TP2... i do
know if it was in TP3 because i was using them in my code then...
> 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?
64k stack limitation is the first thing that comes to mind...
the string type is/was a 256 character array with the 0th (zero-th) element
containing the length of the string... this allowed one to immediately know how
many characters to read at once... it was much faster than iterating thru the
array looking for a nul byte as done in other languages...
it was quite innovative at the time and actually lead to the Hudson Message Base
format being developed by Adam Hudson of QuickBBS fame when he was in high
school (grades 10-12)... this message base format was the greatest thing since
sliced bread when it came out and many other BBS packages adopted it because of
its amazing speed and the large number of messages that could be stored with it...
255 maximum areas
32k total messages
16M maximum size of message data file
in the days of 10M and new 20M hard drives, this was huge and message oriented
BBSes sprung up all over the world along with evolving message oriented store
and forward packet networks like fidonet, WWIVNet, RIME/PCRelay and others...
all because of the string type ;)
--
NOTE: No off-list assistance is given without prior approval.
Please keep mailing list traffic on the list unless
private contact is specifically requested and granted.
More information about the fpc-pascal
mailing list