IonicWind Software

IWBasic => General Questions => Topic started by: Brian on November 29, 2020, 10:01:28 AM

Title: $main
Post by: Brian on November 29, 2020, 10:01:28 AM
Hi,

I understand that the use of $main in a single file compile will be ignored, but when you are compiling Projects, the help file says it "Marks the beginning execution point of the program. Used in project mode compiling."

So where exactly is the "beginning execution point" ?

Brian


Title: Re: $main
Post by: LarryMc on November 29, 2020, 02:19:41 PM
Quote from: undefinedSo where exactly is the "beginning execution point" ?
At the top of the source code file where you started building your project. Usually the file where you create your main screen. Anything in the file before the $MAIN directive will not be acted upon (totally ignored).
But your source code files can be linked in any order  and the file where your program starts may wind up being the last file linked  thus the $MAIN directive..

In the IWB IDE there are 65 source files.
Title: Re: $main
Post by: Brian on November 30, 2020, 08:29:55 AM
Thanks, Larry,

So, basically, it is at the top of your program listing, before anything else, unless the 'anything else' is a comment line!

Brian
Title: Re: $main
Post by: LarryMc on November 30, 2020, 12:31:11 PM
Quote from: Brian on November 30, 2020, 08:29:55 AMSo, basically, it is at the top of your program listing, before anything else, unless the 'anything else' is a comment line!

correct