Index finite lists of positive integers: Difference between revisions

Content added Content deleted
m (promoted to (full) task status.)
m (→‎{{header|REXX}}: added wording to the REXX section header.)
Line 644: Line 644:


=={{header|REXX}}==
=={{header|REXX}}==
This REXX version can handle any sized (decimal) positive integers.
This REXX version can handle zeros as well as any sized (decimal) positive integers.

<lang rexx>/*REXX program assigns an integer for a finite list of arbitrary positive integers. */
No checks are made that the numbers are non-negative integers or malformed integers.
<lang rexx>/*REXX program assigns an integer for a finite list of arbitrary non-negative integers. */
parse arg $ /*obtain optional argument (int list).*/
parse arg $ /*obtain optional argument (int list).*/
if $='' | $="," then $=3 14 159 265358979323846 /*Not specified? Then use the default.*/
if $='' | $="," then $=3 14 159 265358979323846 /*Not specified? Then use the default.*/