Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Returns the status of compilation of code within #Compiled / #EndCompiled sections, if any.

 

Syntax

 

n = Compiled_LastCompile_Result

 

Returns

 

Number

0 means compilation finished successfully.

1 means compilation did not finish.

 

Remarks

 

Your code needs to contain #Compiled / #EndCompiled in order to create the DLL.

 

Restrictions

 

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.

 

See also

 

Examples

 

'---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

#Compiled SuppressRTE Language = FreeBasic

 

  sub SayHelloFromFreeBasic cdecl (byref sDLLFileName as zstringExport

    print "Hi there. I'm a compiled code."

    print "I'm a FreeBasic Sub compiled inside " & sDLLFileName

  end sub

  

#EndCompiled

 

uses "Console"

 

'---Check if FreeBASIC compile was ok

if CompiledCode_LastCompile_Result = 0 Then

  SayHelloFromFreeBasic(Compiled_DLL_FileName)

  printl "Now I'm printing from thinBasic script"

 

Else

  '---Something happened during FreeBASCI compile

  printl "FreeBASIC compile error" in %CCOLOR_FLIGHTRED

  printl

  printl Compiled_LastCompile_Output

end If

 

WaitKey

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software