Script structure

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language >

Script structure

 

Structure of a script file

 

A script is a text file containing thinBasic code.

Inside a script all the code not included into a user defined function is considered main code and executed when script is executed.

 

All the lines not included into a user defined function are considered Main Code.

 

Default main function

 

thinBasic also implements a main function logic. If script contains a function called TBMain and during the script execution TBMain was not called by direct invocation, thinBasic will execute TBMain automatically.

 

TBMain is like the "main" function in C programming language.