Main Function

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.

Famous quotes containing the words main and/or function:

    One of the main things that interfere with our joy is the belief that if we try hard enough, read the right books, follow the right advice, and buy the right things, we could be perfect parents. If we are good enough as parents, our children will be perfect too.... Unfortunately, what comes from trying to live out this philosophy is not perfect children but worried parents.
    Lawrence Kutner (20th century)

    No one, however powerful and successful, can function as an adult if his parents are not satisfied with him.
    Frank Pittman (20th century)