Return Statement

The return statement is used to exit from the current function back to the calling routine, optionally returning a value. The syntax is:

return [expression];

This will evaluate expression and return the result. Returned value will be automatically converted to the expected function type, if needed. The expression is optional; if omitted, the function will return a random value from memory.

  Note : The statement return in functions of the void type cannot have expression – in fact, the return statement can be omitted altogether if it is the last statement in the function body.
Copyright (c) 2002-2012 mikroElektronika. All rights reserved.
What do you think about this topic ? Send us feedback!
Want more examples and libraries? 
Find them on LibStock - A place for the code