Function definition: Difference between revisions
Content deleted Content added
Added Modula-2 |
m →Icon and Unicon: header simplification |
||
Line 366: | Line 366: | ||
This will return a scalar if given scalars, if given one- or two-dimensional arrays it will return the matrix-product of these arrays. E.g. if given two three-element one-dimensional arrays (i.e. vectors), this will return a 3x3 matrix. |
This will return a scalar if given scalars, if given one- or two-dimensional arrays it will return the matrix-product of these arrays. E.g. if given two three-element one-dimensional arrays (i.e. vectors), this will return a 3x3 matrix. |
||
== |
=={{header|Icon}} and {{header|Unicon}}== |
||
⚫ | |||
==={{header|Icon}}=== |
|||
<lang Icon>procedure multiply(a,b) |
<lang Icon>procedure multiply(a,b) |
||
return a * b |
return a * b |
||
end</lang> |
end</lang> |
||
⚫ | |||
This Icon solution works in Unicon. |
|||
=={{header|Inform 7}}== |
=={{header|Inform 7}}== |