Anonymous user
Jensen's Device: Difference between revisions
m
→{{header|REXX}}: added whitespace, split a compound statement.
m (→{{header|REXX}}: added whitespace, split a compound statement.) |
|||
Line 1,288:
=={{header|REXX}}==
parse arg d . /*obtain optional argument from the CL.*/
▲<lang rexx>/*REXX program demonstrates Jensen's device (via call subroutine, and args by name).*/
▲parse arg d .; if d=='' | d=="," then d=100 /*Not specified? Then use the default.*/
numeric digits d /*use D decimal digits (9 is default)*/
say 'using ' d " decimal digits:" /*display what's being used for digits.*/
say
say sum(
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
sum: procedure; parse arg j,start,finish,exp; $= 0
interpret
/*comment
/*comment
return $</lang>
|