[Lazarus] WriteLn back to the GUI
pascaldragon at googlemail.com
Wed Oct 23 21:43:12 CEST 2013
On 23.10.2013 21:14, ListMember wrote:
> On 2013-10-23 21:46, Sven Barth wrote:
>> "Writeln" is a complex functionality. So you should better trust us
>> (hint: I'm a compiler developer) when we say this is more difficult
>> than you imagine.
> I know you're a compiler developer; and, I have no intention of
> challenging you on that front --actually, I don't want to challenge
> anyone on any front at all, I have enough challenges as it is.
It's not about challenging someone. It's about you trying to do
something for which the language/runtime already provides a solution
for, but thereby using cannons to shoot down a bird...
> And, I am not trying to replace all of WriteLn functionality with my own
> I am guessing, just guessing, FPC uses WriteLn to communicate with other
> modules (perhaps Lazarus too), but I also need its output directly in my
Let's maybe get a few things straight first: what are you trying to
achieve in the end? Do you want to capture FPC's output or do you want
to redirect the console output of your own application?
If the first: Why don't you simply use the functionality of the OS to
redirect the output to a file? Or do you start FPC from within your own
application? In that case you could use the pipe mechanism of e.g.
TProcess to capture the output (Lazarus does it the same way).
If the second: use a text driver, modifying the compiler is not the answer.
More information about the Lazarus