Function definition: Difference between revisions

Content added Content deleted
(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.


== Icon and Unicon ==
=={{header|Icon}} and {{header|Unicon}}==
{{works with|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>
==={{header|Unicon}}===
This Icon solution works in Unicon.


=={{header|Inform 7}}==
=={{header|Inform 7}}==