Anonymous user
Function definition: Difference between revisions
→{{header|REXX}}: added a beautification version. -- ~~~~
m (→{{header|REXX}}: added whitespace, added a comment. -- ~~~~) |
(→{{header|REXX}}: added a beautification version. -- ~~~~) |
||
Line 1,069:
=={{header|REXX}}==
===version 1===
<lang rexx>multiply: return arg(1) * arg(2) /*return the product of the two arguments.*/</lang>
===version 2===
Because REXX will return the same precision as the multiplicands, we can do some beautification with the resultant product.
<br><br>I.E.:
<br><br>''' 3.0 * 4.00 ''' yields the product '''12.000'''
<br><br>This version eliminates the '''.000''' from the product.
<lang rexx>multiply: return arg(1) * arg(2) / 1 /*return with a normilized product of 2 args. */</lang>
=={{header|RLaB}}==
|