On Thu, 6 May 2010 12:10:39 -0300 Flávio Etrusco <flavio.etru...@gmail.com> wrote:
> On Thu, May 6, 2010 at 11:58 AM, Florian Klaempfl > <flor...@freepascal.org> wrote: > > José Mejuto schrieb: > >> Hello FPC-Pascal, > >> > >> Thursday, May 6, 2010, 3:53:59 PM, you wrote: > >> > >> c> TList wraps TFPList, which is based internally on an array. So access > >> c> is fast; insertion, deletion not. > >> > >> But it is faster than inserting elements in a dynamic array (unless > >> reference counted ones) because it usually moves less amount of data > >> (4/8 bytes per element). > >> > > > > Why do you think so? You can also create dyn. arrays of pointers. > > I guess José is well aware of it, but isn't it a good thing to suggest > the use of TFPList to "newbies"? Both are good to me. I first implemented my needs as a dynamic array of pointers, precisely. (By the way, started playing with TFPList already, and could not find how to get data back! I mean the symtric of add(). Even tried indexing (who knows, with the syntactic magic of modern language? ;-).) Denis ________________________________ vit esse estrany ☣ spir.wikidot.com _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal