Function definition: Difference between revisions

m
Line 1,104:
# Arguments are obtained using the positional parameters $1, and $2
return `expr $1 * $2`
}
}</lang>
 
# Call the function
multiply 3 4 # The function is invoked in statement context
echo $? # The dollarhook special variable gives the return value</lang>
 
{{works with|Bash}}