What does it do?
What is the difference between exit; and return; ?
Reserved word "Exit" ?
that's a good question...
i believe that exit just terminates the current script, regardless from where it is called (for example inside a function)
while return just ends the current function (that can also be the main program of course)
also if there isn't a return then the function returns 0 automatically i guess
i believe that exit just terminates the current script, regardless from where it is called (for example inside a function)
while return just ends the current function (that can also be the main program of course)
also if there isn't a return then the function returns 0 automatically i guess
I believe Bracco is correct.
Calling "exit" will terminate the current script immediately.
And calling "return" will end the current function/program. Return can, as mentioned, be called with or without a variable. When called without a variable, "return", it is the same as calling "return 0".
P.S. Good job on the wiki so far Gnafu!
Calling "exit" will terminate the current script immediately.
And calling "return" will end the current function/program. Return can, as mentioned, be called with or without a variable. When called without a variable, "return", it is the same as calling "return 0".
P.S. Good job on the wiki so far Gnafu!