Hi Petr and Eros.
Thanks for your help. Oxygen is a very interesting project and I will try learning this.
Hi Maxim.
More info about creating thinBasic modules and their logic can be found in the great TBJ number 2 (thinBasic Journal created by Petr Schreiber): http://www.thinbasic.com/community/s...ournal-Issue-2
In that number I wrote an initial article describing what is a module, what is the main logic, how to use SDK functions to create and parse your own keywords.
I created a SDK for PowerBasic and others (especially Charles Pegge) created the interface inclide file for FreeBasic. There is also an interface for C but to be honest it was not much developed because its author (Roberto Bianchi) in not anymore involved in thinBasic project.
You can find all the material plus some examples inside your thinbasic installation directory under \thinBasic\SDK\SDK.ZIP
Just recently (starting from thinBasic 1.8.8.0, currently the last relese) I've introduced the concept of module classes.
Module classes are binary classes defined inside compiled modules and exposed to thinBasic interpreted language thanks to new SDK functions I've developed: thinBasic_Class_Add(...) and thinBasic_Class_AddMethod(...)
Module classes take advance from the fantastic PowerBasic language and its ability to create classes (in EXE or DLL) being used anywhere just knowing a PTR to the internal instantiated binary class.
Unfortunately this is not a compatible way and PB classes cannot be confused with (for example) C++ classes. They are not the same.
As we said, module classes is just very recent and I cannot say now which will be the final direction. I'm mostrly committed with PowerBasic but keeping thinBasic concept very general so in theory a thinBasic module classes can be also a pointer to an UDT (and not a real class) and than the module must know how to threat that PTR.
So at the moment you can create a standard thinBasic module using PowerBasic or FreeBasic.
The biggest example of thinBasic module created with FreeBasic is Oxygen from Charles Pegge. Oxygen is a just in time source code to machine code converted to in memory execution of source code.
Source code of Oxygen can be found here:
http://www.thinbasic.com/community/f...0-O2h-Compiler
http://www.thinbasic.com/community/s...iler-Downloads
Maybe you can find ideas in there.
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Hi Petr and Eros.
Thanks for your help. Oxygen is a very interesting project and I will try learning this.
You can find the OxygenBasic open source project site here.
http://www.oxygenbasic.org
Bookmarks