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.
Bookmarks