Function definition: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 638: | Line 638: | ||
<lang smalltalk>|mul| |
<lang smalltalk>|mul| |
||
mul := [ :a :b | a * b ].</lang> |
mul := [ :a :b | a * b ].</lang> |
||
=={{header|SNOBOL4}}== |
|||
<lang snobol4> define('multiply(a,b)') :(mul_end) |
|||
multiply multiply = a * b :(return) |
|||
mul_end |
|||
* Test |
|||
output = multiply(10.1,12.2) |
|||
output = multiply(10,12) |
|||
end</lang> |
|||
Output |
|||
123.22 |
|||
120 |
|||
=={{header|SNUSP}}== |
=={{header|SNUSP}}== |