[fpc-pascal] Set size limit

Daniel Gaspary dgaspary at gmail.com
Mon Mar 11 14:32:22 CET 2013


On Mon, Mar 11, 2013 at 7:09 AM, Mark Morgan Lloyd
<markMLl.fpc-pascal at telemetry.co.uk> wrote:
> That was pretty much my gist. Since these days Unicode is larger than 65536
> codepoints I don't think there's any advantage to expanding sets from 256 to
> 65536 elements, efficient operations on sparse arrays of 256-element sets
> would be far better.

In my case the enum has near 600 elements.

TMyEnum = (me1, me2...);

The set though would never be used to contain more than 256.

TMySet = set of TMyEnum;

Is it not viable to modify the compiler to compile the code and raise
an exception if I try to add more than 256 elements to the set ?



More information about the fpc-pascal mailing list