f ()  # two-parameter function.
{
 (( returnValue = $1 * $2 ))
 return $returnValue
}
# main program.
f 3 4                   # call function.
result=$?               # save exit code.
echo return value from function was $result
