Program Structure - main section

information about SharpBASIC language elements
Post Reply
User avatar
frank
Site Admin
Posts: 40
Joined: Sun Nov 21, 2021 12:04 pm
Location: Netherlands
Contact:

Program Structure - main section

Post by frank »

Code execution starts and ends in the main section marked by the main do .. end block, for example:

Code: Select all

main do  ' program entry point
  
  print(“hello world.”);

end;    ' program exit point
The main section also defines the main module in a project; only one module (the main module) can contain a main section.
Keep it simple!
Post Reply