[fpc-pascal] Set size limit

Sven Barth pascaldragon at googlemail.com
Mon Mar 11 15:10:37 CET 2013


Am 11.03.2013 14:59, schrieb Jonas Maebe:
>
> On 11 Mar 2013, at 14:52, Sven Barth wrote:
>
>> If the array is a named one (e.g. "TMyArraySet = bitpacked 
>> array[TMyEnum] of Boolean") then operator overloading could be used...
>
> Yes, but since neither open nor dynamic bitpacked arrays are 
> supported, you'd have to reimplement this for every single pseudo-set 
> type you want to use (except maybe if you use generics, if generics 
> for simple types already work).
Generics do work for array, but maybe not for indices. Also you'd need 
to declare the operators anyway. Best solution in this case might be to 
encapsulate the array in a record and define the operators there...

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130311/39eb2167/attachment.html>


More information about the fpc-pascal mailing list