Re: [fpc-pascal] Array clearing

2017-04-13 Thread Ryan Joseph
> On Apr 12, 2017, at 9:24 PM, Jürgen Hestermann > wrote: > > SetLength(Array,Length(Array)+1); > > You will get an additional element (filled with zeros). > Then you can set > > Array[High(Array)] := whateveryouwant; Well sure, but this kind of code is exactly

Re: [fpc-pascal] Bls: WebAssembly Target

2017-04-13 Thread Michael Van Canneyt
On Thu, 13 Apr 2017, Mr Bee via fpc-pascal wrote: Pada Sabtu, 18 Maret 2017 0:54, Michael Van Canneyt menulis: You'll design a web app in the lazarus IDE (or Delphi IDE, for that matter). The app will be compiled to Javascript. Current thinking is that that

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:

[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

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

[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

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

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

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 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

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),

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

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

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

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

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

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