Re: [fpc-pascal] Compiler hangs while generating debug information

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 18:47 schrieb "Nitorami" : Any opinions ? You can try to minimize your source by removing parts to see what might cause the problem. Alternatively you can debug the compiler in Lazarus. Regards, Sven ___

Re: [fpc-pascal] issue when enabling -O2

2018-01-11 Thread Matias Vara
After fixing the assembler code and other issues, e.g., interruption handlers were not restoring all registers, I observed an speed up of ~12% with -O2 when running a simple webserver example. That's very impresive! Thanks for you help, Matias. 2018-01-10 18:19 GMT+01:00 Matias Vara

Re: [fpc-pascal] can inherited simply replace inherited method(param1, param2, param3)?

2018-01-11 Thread Graeme Geldenhuys
On 2018-01-11 16:35, Dennis wrote: are the 2 below equivalent? Yes they are. Lazarus IDE auto implements the later, and Delphi IDE the first. What is again annoying about Delphi IDE is that it chooses to generate "inherited;" lines, but then can't allow you to code navigate

[fpc-pascal] Compiler hangs while generating debug information

2018-01-11 Thread Nitorami
I encountered an odd problem, however reliably reproducible under both windows 7 and 10, 32bit, with FPC 3.0.2 and 3.0.4. (NOT with Lazarus 1.6.4 which uses FPC 3.0.2 but 64bit) When compiling my program with debug info using fpc -B -g, the compiler hangs just before generating the exe file. It

Re: [fpc-pascal] can inherited simply replace inherited method(param1, param2, param3)?

2018-01-11 Thread Mattias Gaertner
On Fri, 12 Jan 2018 00:35:30 +0800 Dennis wrote: > are the 2 below equivalent? > > procedure Method(param1, param2 : integer); > begin >inherited; > end; > > > > procedure Method(param1, param2 : integer); > begin >inherited Method(param1, param2); > end;

[fpc-pascal] can inherited simply replace inherited method(param1, param2, param3)?

2018-01-11 Thread Dennis
are the 2 below equivalent? procedure Method(param1, param2 : integer); begin inherited; end; procedure Method(param1, param2 : integer); begin inherited Method(param1, param2); end; ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 13:33 schrieb "Mattias Gaertner" : On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal wrote: >[...] > · Add(item [,...]) / Push(item [,...]) : increases Length by one and adds one or more item at the end

[fpc-pascal] PAS2JS: JSON suggestion

2018-01-11 Thread warleyalex via fpc-pascal
IMHO, theTJSJSONexternal class definition is incorrect. Currently, we have class function, if you want to use the stringify method, use this wierd way:TJSJSON.stringify( jsObject); I think code that don't have mutual dependencies should be separate in units: unit ECMA.Json;interface{$mode

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Mattias Gaertner
On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal wrote: >[...] > · Add(item [,...]) / Push(item [,...]) : increases Length by one and adds one > or more item at the end of the array, can also add arrays (concatenation). > > · Clear() :

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Mattias Gaertner
On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal wrote: > Since it's missing the Pas2JS specific forum, I don't know if here is correct > place to post things about "Pas2JS". Hopefully there will be one soon. > I'm using it a lot and it's

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Michael Van Canneyt
On Thu, 11 Jan 2018, Mattias Gaertner wrote: On Thu, 11 Jan 2018 11:44:30 +0100 Sven Barth via fpc-pascal wrote: Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < fpc-pascal@lists.freepascal.org>: Anyway, what I couldn't find is the built-in kind

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Michael Van Canneyt
On Thu, 11 Jan 2018, warleyalex via fpc-pascal wrote: Thanks a lot for the feedback. it worked as expected! The solution was: /* in DWScript world */var recA : JA;recB : JB;recC : JC;for var k:=0 to 2 do begin recC.id := k; recC.name := 'abc'+IntToStr(k); recC.age := 10+k;

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Mattias Gaertner
On Thu, 11 Jan 2018 11:44:30 +0100 Sven Barth via fpc-pascal wrote: > Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < > fpc-pascal@lists.freepascal.org>: > > Anyway, what I couldn't find is the built-in kind of *pseudo-methods for > the record data

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread warleyalex via fpc-pascal
Thanks a lot for the feedback. it worked as expected! The solution was: /* in DWScript world */var recA : JA;recB : JB;recC : JC;for var k:=0 to 2 do begin recC.id := k; recC.name := 'abc'+IntToStr(k); recC.age := 10+k; recB.field1 := 'rec'+ IntToStr(k); recB.params.Add(recC);

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Michael Van Canneyt
On Thu, 11 Jan 2018, Sven Barth via fpc-pascal wrote: Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < fpc-pascal@lists.freepascal.org>: Anyway, what I couldn't find is the built-in kind of *pseudo-methods for the record data type*, set of operations, for inserting, removing,

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < fpc-pascal@lists.freepascal.org>: Anyway, what I couldn't find is the built-in kind of *pseudo-methods for the record data type*, set of operations, for inserting, removing, sorting and otherwise manipulate the content, for instance:

Re: [fpc-pascal] Generics vs templates

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 08:06 schrieb "Michael Schnell" : On 09.01.2018 08:04, Sven Barth via fpc-pascal wrote: But you need to program in a way that allows the usage of multiple, different types. That can more often than not lead to worse performance. Seemingly it is done that way.

Re: [fpc-pascal] Comp type

2018-01-11 Thread greim
By the way there was a bug in fpc 3.0. I am not sure if it is fixed yet. Dividing a comp number by any other number gives wrong results. Please see my posting from 29.06.2016 Markus ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org