PureBasic - Console

Overview

This library allow the programmer to create console mode applications. This is used to create small programs that don't require a user interface or be executed from the function line. Also, console functions can be really helpful to debug a program by printing out some information to the console, without stopping the program flow.

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.

You should start with the OpenConsole() function, since you must use that function to open a console (character mode) display window before you use any other console-related functions.

Please note, that if you create console programs with PureBasic you will still need Windows 95 or later to run them. These programs must be executed only from the Windows function prompt. These programs are not real MS-DOS programs!

Command Index

ClearConsole
CloseConsole
ConsoleColor
ConsoleCursor
ConsoleError
ConsoleLocate
ConsoleTitle
EnableGraphicalConsole
Inkey
Input
OpenConsole
Print
PrintN
RawKey
ReadConsoleData
WriteConsoleData

Example

Console.pb

Supported OS

All

Reference Manual - Index