I need a pre-grown list which I can put (not insert!) items into at indexes 
without getting "List index out of bounds" errors. For example I want to start 
with a list that has 10 empty indexes:

list := TList.Create(10); // 10 empty slots!

list[5] := someItem;

Is this possible using any list type in the RTL? Actually I'd rather just 
disable all the out of bounds errors because  I need some performant which 
isn't making more checks than need be. I want to use a heap-based list because 
the it may need to grow later.

Thanks guys.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to