Re: [fpc-pascal] Array clearing

2017-04-13 Thread Sven Barth via fpc-pascal
Am 13.04.2017 18:06 schrieb "Ryan Joseph" : > > > > On Apr 13, 2017, at 10:29 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > > > SetLength *does* use a reallocate for this, but since it doesn't give you any guarantee for its success as its the task of the memory manager

Re: [fpc-pascal] Hash List

2017-04-13 Thread Giuliano Colla
Il 12/04/2017 15:57, Michael Van Canneyt ha scritto: we could put it in contnrs, and alias it in inifiles.pp +1 Giuliano ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Hash List

2017-04-13 Thread Graeme Geldenhuys
On 2017-04-12 14:54, nore...@z505.com wrote: > maybe it should be pulled out into some other unit so people do > not think it is just INI file related? Agreed! G. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Ryan Joseph
> On Apr 13, 2017, at 10:29 PM, Sven Barth via fpc-pascal > wrote: > > SetLength *does* use a reallocate for this, but since it doesn't give you any > guarantee for its success as its the task of the memory manager to deal with > this, it's easier to assume that the array is indeed copied. >

Re: [fpc-pascal] Hash List

2017-04-13 Thread African Wild Dog
2017-04-12 10:57 GMT-03:00 Michael Van Canneyt : we could put it in contnrs, and alias it in inifiles.pp > > +1 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Sven Barth via fpc-pascal
Am 13.04.2017 14:47 schrieb "Ryan Joseph" : > > > > On Apr 13, 2017, at 7:08 PM, Mattias Gaertner wrote: > > > >> as I understood from (http://wiki.freepascal.org/Dynamic_array< http://wiki.freepascal.org/Dynamic_array>), SetLength will create a copy of the array and free the memory of the shorter

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Jürgen Hestermann
Am 2017-04-13 um 13:17 schrieb MARCOU Gilles: > Regarding this code: >> SetLength(Array,Length(Array)+1); >> Array[High(Array)] := … > as I understood from (http://wiki.freepascal.org/Dynamic_array), > SetLength will create a copy of the array and free the memory of the shorter array. > In this c

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Mattias Gaertner
On Thu, 13 Apr 2017 19:15:13 +0700 Ryan Joseph wrote: > > On Apr 13, 2017, at 7:08 PM, Mattias Gaertner > > wrote: > > > >> as I understood from > >> (http://wiki.freepascal.org/Dynamic_array), > >> SetLength will create a copy of the array and fre

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Ryan Joseph
> On Apr 13, 2017, at 7:08 PM, Mattias Gaertner > wrote: > >> as I understood from >> (http://wiki.freepascal.org/Dynamic_array), >> SetLength will create a copy of the array and free the memory of the >> shorter array. In this case, a lot of memory

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Sven Barth via fpc-pascal
Am 13.04.2017 13:25 schrieb "MARCOU Gilles" : > > Regarding this code: > >> SetLength(Array,Length(Array)+1); >> Array[High(Array)] := … > > > as I understood from (http://wiki.freepascal.org/Dynamic_array), SetLength will create a copy of the array and free the memory of the shorter array. In this

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Mattias Gaertner
On Thu, 13 Apr 2017 13:17:37 +0200 MARCOU Gilles wrote: > Regarding this code: > > > SetLength(Array,Length(Array)+1); > > Array[High(Array)] := … > > as I understood from (http://wiki.freepascal.org/Dynamic_array > ), SetLength will create a copy of

Re: [fpc-pascal] Array clearing

2017-04-13 Thread MARCOU Gilles
Regarding this code: > SetLength(Array,Length(Array)+1); > Array[High(Array)] := … as I understood from (http://wiki.freepascal.org/Dynamic_array ), SetLength will create a copy of the array and free the memory of the shorter array. In this case, a lot

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Benito van der Zander
Hi Ryan, In the real world is anyone actually going to type that out every time? I’d bet most of us have an array class we use and ignore dynamic arrays all together because we all need basic operations like “add” and “remove”. I, for one, have a huge list of array utility functions: http://

[fpc-pascal] Freevision etc.

2017-04-13 Thread Mark Morgan Lloyd
I've not used Freevision/Turbovision before, but am experimenting with James Clarke's DialEdit as an experiment to see whether I can create a fallback user interface for use if an interactive program is running in a shell session. The Lazarus side of things isn't a problem, I know from the past

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Jürgen Hestermann
Am 2017-04-12 um 16:30 schrieb Ryan Joseph: >> Array[High(Array)] := whateveryouwant; > SetLength(Array,Length(Array)+1); > Array[High(Array)] := … > In the real world is anyone actually going to type that out every time? Yes, I do this. Typing is not much work for me. My main focus is on *reada

[fpc-pascal] Bls: Bls: WebAssembly Target

2017-04-13 Thread Mr Bee via fpc-pascal
Pada Kamis, 13 April 2017 13:22, Michael Van Canneyt menulis: > Seriously? Where can we try or test this? This is really a great news! It > reminds me of Morfik. :) Morfik has been, since day 1, the inspiration for this. I knew it! ^_^ > Hope the development will continue. It is. The comp