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":
... mandatory in all trials involving the Treasury at central courts, advocate (Polish adwokat), whose main function is to provide legal assistance, prepare legal opinions and ... inter alia tax advisor (Polish doradca podatkowy), whose main function is to advise persons in tax matters, represent them before courts and State authorities in tax matters and perform other activities ...
Famous quotes containing the words function and/or main:
“The function of comedy is to dispel ... unconsciousness by turning the searchlight of the keenest moral and intellectual analysis right on to it.”
—George Bernard Shaw (18561950)
“The main question raised by the thriller is not what kind of world we live in, or what reality is like, but what it has done to us.”
—Ralph Harper (b. 1915)