PDA

View Full Version : Problem with Console Example in Tutorial


plinydogg
10-03-2006, 01:55 AM
I'm using 1.03 and I tried to run the console part of the "hello world" tutorial...the one with this code:

#include "console"

func WinMain
InitConsole;
ShowConsole;

Writeln("Hello world");
return(false);
end;

When I compile and run it, the console window appears to open and then immediately shut....despite the inclusion of the line:

return(false);

Am I doing something wrong?

kornalius
10-03-2006, 02:51 AM
The return(false) line needs to be return(true). False means that the application has finished and needs to shut right away, true means the application is a windows application and that it will close when the main form is closed.

I will double-check the tutorial and fix it.

plinydogg
10-03-2006, 12:52 PM
Thanks, the tutorial is now fixed and works properly!