Quote from: Charles Pegge on February 21, 2023, 12:45:11 AM
But there is hidden code: the thinBasic_Oxygen.dll module to mediate between thinBasic and o2. It is rather similar to co2, though it can also share variables and support function calls directly. Is this what you intend to do?
If OpenLibrary(0, "Oxygen.dll")
thestring = "result=10+20"
oAddr = CallFunction(0, "o2_basic", @"thestring")
'and/or instead of thestring, an .o2bas file
'Use o2_exec to execute thestring, and return the result
oExec = CallFunction(0, "o2_exec", oAddr)
'Get the result, which should be 30, and store it in oString
'Not sure how this would be accomplished.
PrintN("Error opening oxygen.dll")
uses "oxygen"No external co2.exe is required to compile and execute that code.
dim as string src
print "Hello World!"
if o2_errno then
function Exec(string c, int wait=0) as int