Navigation:  thinBasic language >

Script structure

Previous pageReturn to chapter overviewNext page

 

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 is 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.

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com