Page 1 of 1

Help with Console?

Posted: Wed Mar 03, 2021 2:41 am
by Gary.Maine
This simple code works fine with Windows, but not with Ubuntu 20.04, no console is dipayed.

Code: Select all

 OpenConsole()
  PrintN("Waiting 5 secs before quit...")
 Delay(5000) 
This will run on linux, but again no console is displayed.

Code: Select all

 
OpenConsole()
 x$ = "Waiting 5 secs before quit..."
  ConsoleLocate(1,1)
 PrintN(X$)
 Debug X$
Delay(5000) 
What am I missing?

Thanks

Re: Help with Console?

Posted: Wed Mar 03, 2021 9:23 am
by Marc56us
Hi Gary,

Your two examples work if you compile as described in help
"If your program is intended to be a pure console application (i.e. not a GUI application which sometimes opens a console) then you must remember to set the executable format to 'Console' when you are compiling your programs. "

Compiler > Compiler option > Executable Format > [ Console ]

PS.
- As see in help too, ConsoleLocate() need EnableGraphicalConsole(1)
- To see what happend in console, you can use also Input()

:wink:

Re: Help with Console?

Posted: Wed Mar 03, 2021 3:27 pm
by Gary.Maine
Marc56us,

Duh.... It was getting late. Thanks