RAD Studio |  |

The Value main() Returns
See Also
Collapse All

The value returned by main is the status code of the program; it must be an int. If, however, your program uses the routine exit (or _exit) to terminate, the value returned by main is the argument passed to the call to exit (or to _exit).

For example, if your program contains the call

Copy Code

    exit(1)
    the status is 1.

See Also

About the main() Function

exit

_exit

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!