PDA

View Full Version : #Compiled Language = PowerBasic



Joe Caverly
25-01-2024, 14:23
Well, I have configured thinBasic to use PowerBasic for creating a DLL, instead of FreeBasic.

'---Load Console Module
uses "Console"

#Compiled Language = PowerBasic

sub SayHelloFromPowerBasic cdecl alias "SayHelloFromPowerBasic" (byref sMessage as string) export
'#COMPILER PBWIN 10
dim hWin as LONG
TXT.WINDOW(EXE.Name$, 10, 10, 25, 80) TO hWin
TXT.PRINT sMessage
TXT.PRINT "EXE.Full$: ";
TXT.PRINT EXE.Full$
TXT.PRINT "Press a key to close this window"
TXT.WAITKEY$
TXT.END
end sub

#EndCompiled

' Thanks to thinBASIC autodetection,
' the PowerBasic function is discovered automatically
SayHelloFromPowerBasic("Hello, BASIC")
printl "Press a key to end..."
waitKey


This works as it should,
and presents many a possibility.

Joe

ErosOlmi
25-01-2024, 21:36
Nice isn't it :)

Next thinBasic will have some new features on this side.
First of all you will have user config file for compilers so when you install new thinBasic versions they will not rewrite your own configurations.