Return in Objective-C -


What is the use of returning the integer for the main in the objective-programs.

I accept the same as C programs Return value is useful when you run an application from the command line So it indicates whether it has failed or not.

Most commands in the shell indicate that you can then create a shell script and run your app, check the return value, and do something based on it.

C was originally created to write operating systems like Unix.

For example, Linux / Unix utility like ls command:

  & gt; Ls bla1 bla2 & gt; $ Echo? 0 & gt; Ls bla3 / bin / ls: bla3: Any such file or directory & gt; $ Echo? 1  

Now you can use the return value in the shell script.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -