Returns the status of compilation of code within #Compiled / #EndCompiled sections, if any.
n = Compiled_LastCompile_Result
0 means FreeBASIC compilation finished successfully.
1 means FreeBASIC compilation did not finish.
Your code needs to contain #Compiled / #EndCompiled in order to create the DLL.
This function is useful only if #Compiled / #EndCompiled block was created with SuppressRTE option otherwise internal ThinBASIC runtime window will win in showing error information during script pre parsing phase.
'---Create an FBCode block telling ThinBASIC not to call internal runtime
'---error window in case of FreeBASIC compile error
'---In this case programmer wants to manage compile error from script
sub SayHelloFromFreeBasic cdecl (byref sDLLFileName as zstring) Export
print "Hi there. I'm a compiled code."
print "I'm a FreeBasic Sub compiled inside " & sDLLFileName
'---Check if FreeBASIC compile was ok
if CompiledCode_LastCompile_Result = 0 Then
printl "Now I'm printing from thinBasic script"
'---Something happened during FreeBASCI compile
printl "FreeBASIC compile error" in %CCOLOR_FLIGHTRED