Re: [fpc-pascal] Compilation progress

2012-04-26 Thread waldo kitty
On 4/26/2012 15:06, Jonas Maebe wrote: On 26 Apr 2012, at 17:31, OBones wrote: Is there a way get progress information output by the compiler while building a project? I tried the -vt option, but I can't figure out a way to parse this and get something like current value and max while the li

Re: [fpc-pascal] Compilation progress

2012-04-26 Thread Jonas Maebe
On 26 Apr 2012, at 17:31, OBones wrote: > Is there a way get progress information output by the compiler while building > a project? > I tried the -vt option, but I can't figure out a way to parse this and get > something like current value and max while the lines are output. > I also tried to

Re: [fpc-pascal] Compilation progress

2012-04-26 Thread Sven Barth
On 26.04.2012 17:31, OBones wrote: Hello, Is there a way get progress information output by the compiler while building a project? I tried the -vt option, but I can't figure out a way to parse this and get something like current value and max while the lines are output. I also tried to look in t

[fpc-pascal] Compilation progress

2012-04-26 Thread OBones
Hello, Is there a way get progress information output by the compiler while building a project? I tried the -vt option, but I can't figure out a way to parse this and get something like current value and max while the lines are output. I also tried to look in the lazarus sources but could not f

Re: [fpc-pascal] Compiling from and to memory

2012-04-26 Thread OBones
Jonas Maebe wrote: OBones wrote on Mon, 23 Apr 2012: And because I have to split my generated files so that FPC does not hit the 2GB memory limit (which it does for a 15M source file) What is the structure of that source code? (a few giant routines, large constant arrays, ... ?) Thousands o

Re: [fpc-pascal] Compiling from and to memory

2012-04-26 Thread Jonas Maebe
OBones wrote on Mon, 23 Apr 2012: And because I have to split my generated files so that FPC does not hit the 2GB memory limit (which it does for a 15M source file) What is the structure of that source code? (a few giant routines, large constant arrays, ... ?) Jonas

Re: [fpc-pascal] Re: Can it map class type as key?

2012-04-26 Thread ZHANG Dao-yuan
Yes, I didn't clearly understand the generic mechanism in fpc/tfpgmap. I've read, `A class can be seen as a pointer to an object, or a pointer to a record, with methods associated with it.' in fpc reference.pdf, chapter 6 - Classes. Hence I think fpc takes object as pointer when specialize tfpgm

Re: [fpc-pascal] Re: Can it map class type as key?

2012-04-26 Thread Honza
2012/4/26 ZHANG Dao-yuan <1123mon...@gmail.com>: > Thanks for your makeshift :) . But the problem still confusing me. My code > is in type-section and it's a declaration not a statement. > >> tFpGMap > The form of the code is similar to a comparision expression and `<' here > looks like a less-than

Re: [fpc-pascal] Can it map class type as key?

2012-04-26 Thread Sven Barth
Am 26.04.2012 10:45 schrieb "ZHANG Dao-yuan" <1123mon...@gmail.com>: >> >> program moi; >> {$mode objfpc} >>uses fgl; >>type >>tSI= specialize tFpGMap; >>// tIS= specialize tFpGMap; >> begin >> end. > > > Hi, > I'm trying to use template in fpc 2.6.0. I can map class type as

Re: [fpc-pascal] Re: Can it map class type as key?

2012-04-26 Thread JC Chu
I’m not quite getting what you’re trying to say… Free Pascal and Delphi do have distinct syntaxes for generic type definition and specialization. You may want to consult respective documentations to clarify your understanding of the code. ◦ Delphi ―

Re: [fpc-pascal] Testing existence of a file at compilation time

2012-04-26 Thread Sven Barth
Am 26.04.2012 11:21 schrieb "Mark Morgan Lloyd" < markmll.fpc-pas...@telemetry.co.uk>: > > Is it possible to test for the existence of a file, directory or package at compilation time, i.e. {$if exists() or similar? > > The specific scenario I'm looking at is where I want to publish a couple of pro

Re: [fpc-pascal] Re: Can it map class type as key?

2012-04-26 Thread ZHANG Dao-yuan
Thanks for your makeshift :) . But the problem still confusing me. My code is in type-section and it's a declaration not a statement. tFpGMap The form of the code is similar to a comparision expression and `<' here looks like a less-than operator. But they are not. In my opinion, fpc should no

[fpc-pascal] Re: RE : SQLDB: logging all generated SQL?

2012-04-26 Thread Reinier Olislagers
On 26-4-2012 11:27, Ludo Brands wrote: >>> I vaguely remember somebody mentioning SQLDB has the option >> of dumping >>> to a log all the SQL it sends to the database (in other >> words: logging >>> all SQL sent to the database). >>> >>> Can somebody tell me if that functionality is there and

RE : [fpc-pascal] SQLDB: logging all generated SQL?

2012-04-26 Thread Ludo Brands
> > I vaguely remember somebody mentioning SQLDB has the option > of dumping > > to a log all the SQL it sends to the database (in other > words: logging > > all SQL sent to the database). > > > > Can somebody tell me if that functionality is there and > where to find > > it? Perhaps somethin

Re: [fpc-pascal] Re: Can it map class type as key?

2012-04-26 Thread JC Chu
Notice the {$MODE DELPHI} directive. On Thu, Apr 26, 2012 at 17:24, Lukasz Sokol wrote: > On 26/04/2012 10:14, JC Chu wrote: >> It fails because the operators < and > are not defined for TObject, >> which is assumed by TFPGMap.KeyCompare(). >> >> As a makeshift you can implement a record type to

[fpc-pascal] Re: Can it map class type as key?

2012-04-26 Thread Lukasz Sokol
On 26/04/2012 10:14, JC Chu wrote: > It fails because the operators < and > are not defined for TObject, > which is assumed by TFPGMap.KeyCompare(). > > As a makeshift you can implement a record type to wrap TObject and > define these operators for it. See the attached file for an > example. >

[fpc-pascal] Testing existence of a file at compilation time

2012-04-26 Thread Mark Morgan Lloyd
Is it possible to test for the existence of a file, directory or package at compilation time, i.e. {$if exists() or similar? The specific scenario I'm looking at is where I want to publish a couple of projects on Berlios, and the functionality will differ depending on whether a particular (Laz

[fpc-pascal] Re: SQLDB: logging all generated SQL?

2012-04-26 Thread Reinier Olislagers
On 26-4-2012 10:58, LacaK wrote: >> Can somebody tell me if that functionality is there and where to find >> it? Perhaps something to do with TSQLConnection.LogEvents? >> >> > Look into sqldb.pp at TSQLConnection property OnLog or at global > variable GlobalDBLogHook. > You can register procedur

Re: [fpc-pascal] Can it map class type as key?

2012-04-26 Thread JC Chu
It fails because the operators < and > are not defined for TObject, which is assumed by TFPGMap.KeyCompare(). As a makeshift you can implement a record type to wrap TObject and define these operators for it. See the attached file for an example. Hope it helps. On April 26, at 16:45, ZHANG Dao-

Re: [fpc-pascal] SQLDB: logging all generated SQL?

2012-04-26 Thread LacaK
Can somebody tell me if that functionality is there and where to find it? Perhaps something to do with TSQLConnection.LogEvents? Look into sqldb.pp at TSQLConnection property OnLog or at global variable GlobalDBLogHook. You can register procedure, which will receive log events and you can

[fpc-pascal] Can it map class type as key?

2012-04-26 Thread ZHANG Dao-yuan
program moi; {$mode objfpc} uses fgl; type tSI= specialize tFpGMap; // tIS= specialize tFpGMap; begin end. Hi, I'm trying to use template in fpc 2.6.0. I can map class type as value as above code can be compiled. But if I uncomment the declaration of tIS -- map class ty

Re: [fpc-pascal] SQLDB: logging all generated SQL?

2012-04-26 Thread michael . vancanneyt
On Thu, 26 Apr 2012, Reinier Olislagers wrote: Good morning list, I vaguely remember somebody mentioning SQLDB has the option of dumping to a log all the SQL it sends to the database (in other words: logging all SQL sent to the database). Can somebody tell me if that functionality is there a

[fpc-pascal] SQLDB: logging all generated SQL?

2012-04-26 Thread Reinier Olislagers
Good morning list, I vaguely remember somebody mentioning SQLDB has the option of dumping to a log all the SQL it sends to the database (in other words: logging all SQL sent to the database). Can somebody tell me if that functionality is there and where to find it? Perhaps something to do with TS