Filter: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) (→{{header|REXX}}: refurbished and corrected) |
Walterpachl (talk | contribs) m (→Using a control array: fix </syntaxhighlight>) |
||
Line 3,344:
===Using a control array===
This version uses a control array (even.*)
<syntaxhighlight lang="rexx">
Parse Arg n seed . /* obtain optional arguments from CL*/
If n==''|n=="," Then n=50 /* Not specified? use the default */
Line 3,361 ⟶ 3,360:
If even.k Then /* that are even */
Say right('x.'k,20) '=' right(x.k,9)
End</syntaxhighlight>
{{out|output|text= when using the input of: <tt> 20 1234567 </tt>}}
<pre>
Line 3,372 ⟶ 3,371:
x.19 = 92502
x.20 = 24808</pre>
===using one array, destructive===
This version just uses one array to perform the filtering instead of creating a ''new'' array.
|