return;
return (parameter);
Terminates the function. In the second case the given parameter is returned
as result to the calling function, where it can be evaluated.
Parameters:
parameter - The value to be returned (variable, expression
or pointer)
Speed:
Fast
Remarks:
!! A function that contains a wait loop can not return a parameter, because wait() already returns to the calling function before the final return statement is excecuted.
Example:
function my_distance_to_you()
{
if (me == NULL || you == NULL) { return(-1); } // negative distance indicates error
return(vec_dist(my.x,your.x));
}
See also:
function, wait
► latest
version online