How do I see, or what is an OpenConsole
-
- New User
- Posts: 9
- Joined: Thu Jun 25, 2020 11:11 pm
How do I see, or what is an OpenConsole
how do i get an openconsole(), i have been trying for days have an console appear, and have something printed on it and have NEVER had a console appear, i don't know what they are referring to, I assume that a console is a window on the screen with something printed in it!
1 If OpenConsole ()
2 EnableGraphicalConsole (1)
3
4 For i = 0 To 200
5 ConsoleLocate ( Random (79) , Random (24) )
6 Print ("*")
7 Next
8
9 ConsoleLocate (30 , 10)
10 PrintN (" Press return to exit ")
11 Input ()
12 EndIf
1 If OpenConsole ()
2 EnableGraphicalConsole (1)
3
4 For i = 0 To 200
5 ConsoleLocate ( Random (79) , Random (24) )
6 Print ("*")
7 Next
8
9 ConsoleLocate (30 , 10)
10 PrintN (" Press return to exit ")
11 Input ()
12 EndIf
Re: How do I see, or what is an OpenConsole
A console is a 'DOS-Box' like if you run cmd.
If I run your progrom in the IDE it shows a console window.
If you create an exe, you have to change the Executable-Format in Compiler Options
to Console.
You don't put the line numbers in the code
And you should use the code tags to show your code like
If I run your progrom in the IDE it shows a console window.
If you create an exe, you have to change the Executable-Format in Compiler Options
to Console.
You don't put the line numbers in the code

And you should use the code tags to show your code like
Code: Select all
EnableExplicit
Define i.i
If OpenConsole ()
EnableGraphicalConsole (1)
For i = 0 To 200
ConsoleLocate ( Random (79) , Random (24) )
Print ("*")
Next
ConsoleLocate (30 , 10)
PrintN (" Press return to exit ")
Input ()
CloseConsole()
EndIf
- NicTheQuick
- Addict
- Posts: 1520
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: How do I see, or what is an OpenConsole
On Linux you always have to choose the executable format "Console" in the compiler options if you want to see a console window.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
-
- New User
- Posts: 9
- Joined: Thu Jun 25, 2020 11:11 pm
Re: How do I see, or what is an OpenConsole
i am still trying to learn system, what isNicTheQuick wrote:On Linux you always have to choose the executable format "Console" in the compiler options if you want to see a console window.
Enableexplicit
define i.i
it is not in the example of code that was presented to me
I still cannot get an openconsole i don't know what i am doing wrong i don't have those compiler options or again i am doing something wrong
Re: How do I see, or what is an OpenConsole
Do you use PureBasic
Every version of PureBasic has these compiler settings, at least since I'm using PureBasic.
So please tell us your OS and your version of PureBasic, before we only speculate about something.
Btw.:
Place the cursor on the word EnableExplicit and press F1 (in the IDE of course)

Every version of PureBasic has these compiler settings, at least since I'm using PureBasic.
So please tell us your OS and your version of PureBasic, before we only speculate about something.
Btw.:
Place the cursor on the word EnableExplicit and press F1 (in the IDE of course)
-
- New User
- Posts: 9
- Joined: Thu Jun 25, 2020 11:11 pm
settings
OS is Windows 10 Pro
PureBasic version is 5.72
PureBasic version is 5.72
Re: How do I see, or what is an OpenConsole
EnableExplicit means that all the variables you create, must be created explicitly by the directive Define else an error occurs.
This prevents you to search a bug during many hours, in a big program, just because you forget to type a character.
It is very important, and I advise you to use it too !
Define just tells the compiler you create a variable.
"Define" is like the old basic statement named "let".
This prevents you to search a bug during many hours, in a big program, just because you forget to type a character.
It is very important, and I advise you to use it too !
Define just tells the compiler you create a variable.
Code: Select all
EnableExplicit ; this will tell me if I do a mistake
Define x, y, z ; x, y and z are 3 new variables
Define a
Define b
Define c ; a, b and c are 3 new variables too
Re: settings
So if you press F5 the program should start and you should see the console window.c128/64basicyes wrote:OS is Windows 10 Pro
PureBasic version is 5.72
Or ... the exexutable is blocked by a VirusScanner
-
- New User
- Posts: 9
- Joined: Thu Jun 25, 2020 11:11 pm
hooray
took mcafee off, reinstalled and it runs
Anything else anyone should tell me?
Anything else anyone should tell me?
Re: hooray
yes: good luck and have fun!c128/64basicyes wrote:Anything else anyone should tell me?

Hygge
Re: How do I see, or what is an OpenConsole
You can try
DEBUG "text"
to see your program output (it will open the Debug Window with the text "text" in it)
If you are doing a Windows Program, you should openwindow() for your output.
If you are planning to do a Game, openscreen() is your friend.
If you are planning to do a program to run in the background or just for testing, openconsole() may help you, as it is very similar to old computers output. It should be used only by very begginners or very advanced programmers.
DEBUG "text"
to see your program output (it will open the Debug Window with the text "text" in it)
If you are doing a Windows Program, you should openwindow() for your output.
If you are planning to do a Game, openscreen() is your friend.
If you are planning to do a program to run in the background or just for testing, openconsole() may help you, as it is very similar to old computers output. It should be used only by very begginners or very advanced programmers.