(*FP-default: {$APPTYPE console}*)
program hello;
begin
writeln('Hello World');
end.
When compiling the hello-Program with FreePascal for
Windows 9.x-platform, you get a native Windows-console-application.
When compiling the Hello-Program with BP 7, you get a native
DOS-console-application.
When running the Windows-console-application from within
Win95 GUI (e.g. via double-clicking in Explorer, not by
calling it from the command-prompt), the application's
window does get closed as soon as the application terminates.
You have almost no chance to read the output-text.
When running the DOS-console-application from within
Win95 GUI, the application's window usually does not
get closed. Instead if you press a key or the like,
Windows issues a message, informing you about the fact
that the DOS application is terminated and that you may
click the "close window"-button.
Is there some compiler-directive or the like for FreePascal
so that windows of win-console-applications do not get
closed right after applications' termination?
Many thanks
Ulrich


|