BCX Documentation Revision History
created and maintained by Robert Wishlaw
As well, example code demonstrating the problem and solution has been added.
hyperlinked instances of
to their primary reference.β Note carefully the use of the parentheses in SUB rectProc1. The BCX translator requires that only parentheses, in this case, (rct), are syntaxed instead of the typical (*rct) used, when dereferencing a pointer to a struct. The BCX translator adds the asterisk in the 'C' code.
An example demonstrating the use of the BCX_TREEVIEW function is available in the Trview1 directory of the GUI_Demo.zip downloadable from the BCX BASIC Forum GUI Demos 2020 post https://bcxbasiccoders.com/smf/index.php?topic=390.0
β Pelles C, Version 12 and up, will not compile this example. In FUNCTION Angle2, changing properties is now flagged as an error.
β MB_HELP flag cannot be used in a console.
and added Example 2, which shows how the MB_HELP flag can be used in a GUI application.IF LCASE$(SomeString$) = "I like Cocoa Puffs" THEN ...to
IF LCASE$(SomeString$) = LCASE$("I like Cocoa Puffs") THEN ...
1997,Ford,E350,"Super, ""luxurious"" truck"would be parsed to
1997 Ford E350 Super, "luxurious" truck
FREE statement
has been replaced withFREE statement
There are still some section heads that are not amenable to batch processing that will have to be changed manually.font-family: Verdana, Tahoma, sans-serif;to
font-family: Segoe UI, Verdana, Tahoma, sans-serif;
Number = 0b1001101000011110010110100to
Number = 0b00000001001101000011110010110100
β Please note that the DPI flag is deprecated.
β do not use AUTO if compiling with C++. Since 2010, the AUTO keyword is no longer a C++ storage-class specifier and has been repurposed.
β do not use REGISTER if compiling with C++. It was deprecated in the C++11 standard and removed from C++17 standard.
LINE INPUT allows you to collect characters typed on the keyboard, including commas, without the special need to use quotation marks. This is mostly compatible with PowerBasic and Qbasic except that, in BCX, when used to collect characters typed on the keyboard, the prompt is not optional.
https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266(v=vs.85).aspx
β The directory must be empty of files for RMDIR to remove the directory.
β X64 code using DYNAMIC arrays will probably fail. DO NOT USE DYNAMIC ARRAYS IN 64 BIT code!
β The $NODLLMAIN directive must precede the $DLL directive in the source code file.
DIM Array$[30]there will be 30 storage locations for data with the index numbered from array$[0] to array$[29]. This differs from QBASIC which will allocate 31 storage locations with the index numbered from array$[0] to array$[30].
"Note well that although the size of the dimensions can be altered,...."
to readingβ Although the number of elements in a dimension can be altered,....
FPRINT stderr, "An error has occurred"in order to be able to send formatted output to the stderr.
UnregisterClass(BCXClassName,BCX_HINSTANCE);
UNTIL x1$ = ""to
LOOP UNTIL x1$ = ""
A negative value can be entered as an argument for the CtlID% parameter to indicate that the tab control should not be subclassed.
DIM RAW RetVal = foo(x,y,z) AS INTEGER
BCX allows static SUB/FUNCTION to be coded as:
PRIVATE FUNCTION MyFunction() AS INTEGER PRIVATE SUB MySub()
CLNG rounds a numeric expression to a LONG(32-bit integer) value. CLNG rounds to the nearest even number. For example, -0.5 rounds to 0, and 3.5 rounds to 4.
"When BCX_MDialog is detected within the WinMain function the following globals will be defined: BCX_HINSTANCE, BCX_SCALEX and BCX_SCALEY In addition to this 'BCX_HINSTANCE = hinst' will be emitted immediately before the first occurrence of BCX_MDialog."
"REM and ' can be separated from from a statement with a colon provided a there is a space between the last statement and colon. Of course the preferred way would be to just forget the colon."and, as well, added examples showing valid and invalid syntax for embedded comments.
OPEN EXTRACT$(filename$,".") + ".bas" FOR INPUT AS FP1are valid.
When any BCX VBS scripting procedure is invoked, the translator will automatically add the following define to the output "C" code.
#ifndef _WIN32_DCOM #define _WIN32_DCOM #endifA similar statement was added to the BCX COM Interface Procedures page.
Due to the BCX Project being in abeyance, this is the final version of the BCX Help file.
Warning ! do not append any data type declaration suffix, that is, %, to an array index variable.
is legal however
is not legal.
Warning ! do not append any data type declaration suffix, that is, %, to an array index.
DIM array$[i]
is legal however
DIM array$[i]
is not legal.
to Dimensioning Arrays section of Variables page.CASE WM_DESTROY UnregisterClass(AppName$, BCX_HINSTANCE) 'so destroy it PostQuitMessage(0) EXIT FUNCTIONstatements from 'Popup Dialog Box from Menu' sample.
in device units or pixels
toin device units or, if the PIXELS optional parameter was specified in the GUI statement, in pixels
CASE WM_DESTROY UnregisterClass(AppName$, hInstance) PostQuitMessage(0)statements from MCI PLAYWAV example on PLAYWAV page.
CASE WM_DESTROY UnregisterClass(AppName$, BCX_HINSTANCE) 'so destroy it PostQuitMessage(0) EXIT FUNCTION
FUNCTION = ""is now legal in BCX.
"When using BCX_FORM without
GUI "Classname"
a ClassName must be provided by using
BCX_CLASSNAME$ = "SomeClassName"
prior to initialization. "
GLOBAL Func(a AS INTEGER) AS FUNCTION INTEGER to GLOBAL Func(INTEGER) AS FUNCTION INTEGERin example in Function Pointers section of Pointers page.
β In GUI programs,
when dimensioning a DYNAMIC array,
the
DIM DYNAMIC
LOCAL DYNAMIC,
or
GLOBAL DYNAMIC
statement must appear inside a BEGIN
EVENTS ... END
EVENTS structure or inside a FUNCTION or a
SUB.
FUNCTION = ReturnValuestatement causes an immediate exit from the function, returning to the caller the value contained in ReturnValue.