...
Functions can also return a value. This means when we return to the line where the function was called, it has now carried a number with it. In processing, functions that have no return value are declared with “void” return type.
Example
...
...
Function
...
Declaration
...
This
...
is
...
how
...
the
...
function
...
is
...
named,
...
its
...
return
...
type
...
and
...
parameters
...
defined
...
.
...
int functionName (int parameterName)
{
return parameterName + 5;
}
...
Function call
This is how we execute a function:
...
functionName(3) ;
...