BCX System variables

BCX recognizes the following declarations as static char system variables pre-set to the values indicated in the comments.

It is the programmer's responsibility not to alter the contents of these 16 string system variables.


 NUL$    ' Null ASCII character 0 
 
 BEL$    ' Bell ASCII character 7 
 
 BS$     ' Back Space ASCII character 8 
 
 TAB$    ' Horizontal Tab ASCII character 9 
 
 LF$     ' Line Feed ASCII character 10 
 
 VT$     ' Vertical Tab ASCII character 11 
 
 FF$     ' Form Feed ASCII character 12 
 
 CR$     ' Carriage Return ASCII character 13 
 
 EF$     ' End-of-File ASCII character 26 
 
 ESC$    ' Escape ASCII character 27 
 
 SPC$    ' Space ASCII character 32 
 
 DQ$     ' Quotation Mark ASCII character 34 
 
 DDQ$    ' Double-Double Quotation Mark ASCII character 34 
 
 CRLF$   ' Carriage Return and Line Feed 

 TRUE    ' has a value of 1
 
 FALSE   ' has a value of 0

 

BCX_CONSOLE global handle

BCX translates BCX_CONSOLE to "hConsole" which is a global handle, used for decades by most of the BCX console runtime code. BCX not only does the text translation, it also emits the relevant C\C++ code that declares and initializes hConsole, so you don't have to.

Typically, when using a console mode function, a handle would be declared, and then retrieved and then, finally, used as in the following code.


 DIM hOut AS HANDLE
 hOut = GetStdHandle(STD_OUTPUT_HANDLE)
 SetConsoleDisplayMode (hOut, CONSOLE_FULLSCREEN_MODE, NULL)
 DELAY(3)  ' wait three seconds 
 SetConsoleDisplayMode (hOut, CONSOLE_WINDOWED_MODE, NULL)
 PAUSE

Using BCX_CONSOLE, the code is simplified to the following


 SetConsoleDisplayMode (BCX_CONSOLE, CONSOLE_FULLSCREEN_MODE, NULL)
 DELAY(3)  ' wait three seconds 
 SetConsoleDisplayMode (BCX_CONSOLE, CONSOLE_WINDOWED_MODE, NULL)
 PAUSE

CONWIN

BCX automatically transforms CONWIN to GetConsoleWindow() which is a WinAPI function that returns a window handle to the active console window. Now you can:

 
 CENTER(CONWIN), 
 
 HIDE(CONWIN), 
 
 SHOW(CONWIN)
 

and more.