Revision [1411]

This is an old revision of CommandReturn made by DavidLee on 2010-05-14 04:04:24.

 

Command return


Name

return returns from a function

Synopsis

return value;


Description

return stops executing a function and returns from it with the value as the exit value of the function.
This becomes $? to the calling code.

Example
function foo () 
{
	if true ; then 
   	 return 1;
	fi 
	echo This should never happen;
}

foo
echo $?


Result
1





Functions
Commands
CategoryCommands
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki