Both are acceptable. The return value it the
ExitCode
which is returned to the OS when application is already terminated. Exit code conventions are application-specific, not based on any standard. Usually, 0 is considered as "no problem", and other values can be used to indicate some problems encountered during application execution. A parent process (for example some your application which started the application in question or a batch file where it is called
errorlevel
) can examine exit code after the process is terminated and do something with this value.
These days, this feature is not used often, because it is pretty archaic in its nature and style. I can be used in some pretty unusual techniques, when spawning a separate process is important, but working in several processes is itself not very usual, because processes are well isolated in modern OS.
Please see:
http://en.wikipedia.org/wiki/Exit_code[
^].
—SA