[fpc-pascal] Set size limit
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Tue Mar 12 08:36:13 CET 2013
Ewald wrote:
> Once upon a time, Mark Morgan Lloyd said:
>> No, because the elements in a set are dictated by their position. A
>> set that can contain anything between 0 and 256 elements occupies 8
>> bytes in memory with the (bit representing the) 0 element at one end
>> and the (bit representing the) 256 element at the other, a set to
>> contain up to (say) 257 elements would require more space and that's
>> not supported.
>>
> Probably a typo, but 8 bit * 8 bytes = 64 elements. So I suppose you
> mean `[...] occupies 32 bytes in memory [...]`?
>
> Just so nobody gets confused :-)
Definitely a typo, or rather the fingers running ahead of the brain. I
was thinking of various compilers I'd come across that ordered things
differently and how best to not imply that [0] invariably mapped onto $0001.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list