0
why we write return 0 only I tried to write return 7282 and it still work . what's the reason?
2 odpowiedzi
+ 4
return 0 means the function closed normally. Numbers from 1-999 usally mean that an error occured.
That's just convention ;)
+ 2
You must be talking about the small example given in the "BASIC" of this app, as Mr Niclas said 0 means the function closed normally or was successful and other no mean that an error occurred. Simple program will work for any of the value as they have to compile only those small sentences but think of a complex program as soon as compiler will read other value than 0 it will stop there and not execute further sentences as for them any no other than 0 means an error occurred.