PDA

View Full Version : BCX Programming Language



primo
02-06-2024, 21:11
https://bcxbasiccoders.com/
the new 64bit bcx version download contains a fully configured IDE , a C compiler and the BCX translator. it allow you to choose 64 or 32 bit when you press F5 to compile ,

it has many functions resembling that of powerbasic such as Retain$, Remain$, Tally, there is no Parse but Split, etc , and a PowerBASIC compatible BCX macros such as:
CBHNDL - Equates to hWnd 'handle of the window.
look here
https://bcxbasiccoders.com/webhelp/BCXHelp.htm
look also https://forum.powerbasic.com/forum/user-to-user-discussions/powerbasic-for-windows/833839-do-you-need-a-64-bit-compiler?p=833992#post833992

i think thinbasic x64 version can be developed using this nice tool. at least a showcase a preview small version

ErosOlmi
03-06-2024, 13:01
Ciao Primo,

I follow BCX since 2022.
Studied it a lot in the past, also used to check how it was translating COM objects into C code and I've learned a lot from C code.

Thanks also to this, next thinBasic update 1.12.1, out in few days, will have much more complete runtime COM objects.
The following code (or even more complex) will be valid thinBasic code:


DIM Xls AS iDispatch
dim Rng as iDispatch

Xls = CreateObject("Excel.Application")

Xls.Visible = TRUE
Xls.Workbooks.Add

Xls.Cells(1, 1).Value = "Name"
dim s as string
s = Xls.Cells(1, 1).Value

Xls.Cells(1, 1).Font.Bold = TRUE
Xls.Cells(1, 1).Interior.ColorIndex = 30
Xls.Cells(1, 1).Font.ColorIndex = 2
Xls.Cells(2, 1).Value = "Test value 1"
Xls.Cells(3, 1).Value = "Test value 2"
Xls.Cells(4, 1).Value = "Tets value 3"
Xls.Cells(5, 1).Value = "Test value 4"

Rng = Xls.Range("A1","A5")
Rng.Font.Size = 14
Rng = NOTHING

Rng = Xls.Range("A2","A5")
Rng.Interior.ColorIndex = 36
Rng.EntireColumn.Autofit

Sleep (10000)

Xls.DisplayAlerts = FALSE
Xls.quit

Rng = NOTHING
Xls = NOTHING


Regarding migrating from PowerBasic ()to me is still a magnificent programming language but death) to other programming languages ...
I've tried some experiments in the past using FreeBasic and Jose Roca library WinFBX https://github.com/JoseRoca/WinFBX but as soon as I realize the effort ... I give up.
thinBasic source is almost 100k lines of code written by me starting from 2004 plus some many other thousand lines written by others.

Also tried PureBasic but I do not like its syntax
Tried C# and Visual Studio, which we use at work for hundred of projects
Tried Free Pascal with its Lazarus IDE, which I like very much
For a while I tried BCX but at that time what stopped me was the missing of a good IDE and my low knowledge of C

Maybe time to reconsider the future and think about a new development language
Also to reconsider many thinBasic Core internals that, to my recent eyes, were wrongly developed.
So it would not be just a "translation" but a reprogramming of many Core parts that would influence all the thinBasic modules.