Re: [fpc-pascal] Getting fast output

2008-07-23 Thread leledumbo
Jonas Maebe-2 wrote: But that won't help you in this case, because settextbuf does not change the flushing behaviour when writing to the screen. For that, you have to follow Tomas' advice. Done, but I still demand it to be in System unit. That way, no additional unit is needed. Does

Re: [fpc-pascal] freeing string equal to setting to empty string?

2008-07-23 Thread Jonas Maebe
On 23 Jul 2008, at 06:32, Marc Santhoff wrote: I understand right that (as I have asked before) an empty (ansi)string is equal to NIL. True. If this is correct, is setting a string to '' the same as setting the string to NIL? No. So i can e.g. use exchagably: {$H+} var s: string;

Re[4]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-07-23 Thread Roland Turcan
Hello Mattias, Next backtrace: Compiling ./unit/ResConf.pas Assembling resconf An unhandled exception occurred at $00148A20 : Breakpoint 1, 0x00018100 in fpc_raiseexception () (gdb) bt #0 0x00018100 in fpc_raiseexception () #1 0x0010dde4 in TOUTPUTFILTER__EXECUTE (THEPROCESS=0x2700a20,

[fpc-pascal] how to catch fpopen() output

2008-07-23 Thread Graeme Geldenhuys
Hi, I have a function called fpgOpenURL(...) which contains the following if fpsystem('which xdg-open') = 0 then Helper := 'xdg-open' else if fpsystem('which firefox') = 0 then Helper := 'firefox'; else if fpsystem('which konqueror') = 0 then Helper :=

[fpc-pascal] Re: how to catch fpopen() output

2008-07-23 Thread Graeme Geldenhuys
Sorry, I meant catching fpSystem() output... On Wed, Jul 23, 2008 at 2:40 PM, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, I have a function called fpgOpenURL(...) which contains the following if fpsystem('which xdg-open') = 0 then Helper := 'xdg-open' else if

Re: [fpc-pascal] Re: how to catch fpopen() output

2008-07-23 Thread ik
You should use pipes rather then fpSystem for that. Ido On Wed, Jul 23, 2008 at 3:44 PM, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Sorry, I meant catching fpSystem() output... On Wed, Jul 23, 2008 at 2:40 PM, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, I have a function called

Re: Re[4]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-07-23 Thread Mattias Gärtner
Zitat von Roland Turcan [EMAIL PROTECTED]: Hello Mattias, Next backtrace: Compiling ./unit/ResConf.pas Assembling resconf An unhandled exception occurred at $00148A20 : Breakpoint 1, 0x00018100 in fpc_raiseexception () (gdb) bt #0 0x00018100 in fpc_raiseexception () #1 0x0010dde4 in

Re: Re[4]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-07-23 Thread Mattias Gärtner
Zitat von Roland Turcan [EMAIL PROTECTED]: Hello Mattias, Next backtrace: Compiling ./unit/ResConf.pas Assembling resconf An unhandled exception occurred at $00148A20 : Breakpoint 1, 0x00018100 in fpc_raiseexception () (gdb) bt #0 0x00018100 in fpc_raiseexception () #1 0x0010dde4 in

Re: [fpc-pascal] freeing string equal to setting to empty string?

2008-07-23 Thread Marc Santhoff
Am Mittwoch, den 23.07.2008, 08:28 +0100 schrieb Jonas Maebe: On 23 Jul 2008, at 06:32, Marc Santhoff wrote: I understand right that (as I have asked before) an empty (ansi)string is equal to NIL. True. If this is correct, is setting a string to '' the same as setting the string to

Re: [fpc-pascal] how to catch fpopen() output

2008-07-23 Thread Marc Santhoff
Am Mittwoch, den 23.07.2008, 14:40 +0200 schrieb Graeme Geldenhuys: Hi, I have a function called fpgOpenURL(...) which contains the following if fpsystem('which xdg-open') = 0 then Helper := 'xdg-open' else if fpsystem('which firefox') = 0 then Helper :=

Re: [fpc-pascal] freeing string equal to setting to empty string?

2008-07-23 Thread Luca Olivetti
El Wed, 23 Jul 2008 17:15:13 +0200 Marc Santhoff [EMAIL PROTECTED] escribió: That's the important part, I'm dealing with cleanly freeing strings when destroying objects. I may be wrong but I think you don't need to do anything, when you free a class the memory used by string fields is

Re: [fpc-pascal] freeing string equal to setting to empty string?

2008-07-23 Thread Mattias Gaertner
On Wed, 23 Jul 2008 19:21:00 +0200 Luca Olivetti [EMAIL PROTECTED] wrote: El Wed, 23 Jul 2008 17:15:13 +0200 Marc Santhoff [EMAIL PROTECTED] escribió: That's the important part, I'm dealing with cleanly freeing strings when destroying objects. I may be wrong but I think you don't need

Re: [fpc-pascal] freeing string equal to setting to empty string?

2008-07-23 Thread Joao Morais
Luca Olivetti wrote: El Wed, 23 Jul 2008 17:15:13 +0200 Marc Santhoff [EMAIL PROTECTED] escribió: That's the important part, I'm dealing with cleanly freeing strings when destroying objects. I may be wrong but I think you don't need to do anything, when you free a class the memory used by

Re: [fpc-pascal] freeing string equal to setting to empty string?

2008-07-23 Thread Luca Olivetti
En/na Mattias Gaertner ha escrit: [*]though I know of at least a nasty leak with gtk2 under lazarus that heaptrc didn't trace. Which one? http://bugs.freepascal.org/view.php?id=9259 (I just noticed you fixed it, but heaptrc didn't report anything when I first discovered it). Bye -- Luca

Re: [fpc-pascal] freeing string equal to setting to empty string?

2008-07-23 Thread Mattias Gaertner
On Wed, 23 Jul 2008 22:54:08 +0200 Luca Olivetti [EMAIL PROTECTED] wrote: En/na Mattias Gaertner ha escrit: [*]though I know of at least a nasty leak with gtk2 under lazarus that heaptrc didn't trace. Which one? http://bugs.freepascal.org/view.php?id=9259 (I just noticed you fixed

Re: [fpc-pascal] how to catch fpopen() output

2008-07-23 Thread Anthony Henry
Could also use popen. Sent from my iPhone On Jul 23, 2008, at 11:11, Marc Santhoff [EMAIL PROTECTED] wrote: Am Mittwoch, den 23.07.2008, 14:40 +0200 schrieb Graeme Geldenhuys: Hi, I have a function called fpgOpenURL(...) which contains the following if fpsystem('which

Re: [fpc-pascal] freeing string equal to setting to empty string?

2008-07-23 Thread David Emerson
On Wednesday 23 July 2008 7:46 pm, Marc Santhoff wrote: That's interesting and nice. Can I assume the same is valid for dyn arrays in a procedure or function context? The short answer is yes. There was recently (about a month ago) a discussion about some of these very issues, from 21 to 29