[fpc-pascal]writeln in win32 gui application

Michael Van Canneyt michael.vancanneyt at wisa.be
Sun May 9 12:23:28 CEST 2004


On Sun, 9 May 2004, vs wrote:

> Hi,
>
> The following program gives run time error 103. If I uncomment the
> rewrite line, it runs ok. Is this a bug or feature? If it is a feature,
> can somebody explain, the reasoning behind it.
>
> program guiwriteln;
>
> {$mode objfpc}{$H+}
> {$apptype gui}

This is the culprit. For GUI apps standard/input/output are not initialized.
Initializing them would create a console window, which is not what you want
when running a GUI application.

Michael.




More information about the fpc-pascal mailing list