In many programming languages, the main function is where a program starts execution. It is responsible for the high-level organization of the program's functionality, and typically has access to the command arguments given to the program when it was executed. Thus main is very important to run your code.
The main function is generally the first programmer-written function run when a program starts, and is invoked directly from the system-specific initialization contained in crt0 or equivalent. However, some languages can execute user-written functions before main runs, such as the constructors of C++ global objects.
Other articles related to "main function":
... courts, advocate (Polish adwokat), whose main function is to provide legal assistance, prepare legal opinions and drafts of legislative acts, and represent persons before court in civil, administrative and criminal ... tax advisor (Polish doradca podatkowy), whose main function is to advise persons in tax matters, represent them before courts and State authorities in tax ...
Famous quotes containing the words function and/or main:
“Literature does not exist in a vacuum. Writers as such have a definite social function exactly proportional to their ability as writers. This is their main use.”
—Ezra Pound (18851972)
“I do not deny that there may be other well-founded causes for the hatred which various classes feel toward politicians, but the main one seems to me that politicians are symbols of the fact that every class must take every other class into account.”
—José Ortega Y Gasset (18831955)