Stream merge: Difference between revisions

Content added Content deleted
(Added a Perl section.)
m (→‎version 2: changed wording in the REXX section header.)
Line 769: Line 769:
<br>and stops reading subsequent &nbsp; ''new'' &nbsp; input files when it encounters a file that doesn't exist &nbsp; (or is empty).
<br>and stops reading subsequent &nbsp; ''new'' &nbsp; input files when it encounters a file that doesn't exist &nbsp; (or is empty).


No &nbsp; ''heap'' &nbsp; is needed to keep track of which record was written and needs replenishing from its input file.
No &nbsp; ''heap'' &nbsp; is needed to keep track of which record was written, nor needs replenishing from its input file.
<lang rexx>/*REXX pgm reads sorted files (1.TXT, 2.TXT, ···), and writes sorted data ───► ALL.TXT */
<lang rexx>/*REXX pgm reads sorted files (1.TXT, 2.TXT, ···), and writes sorted data ───► ALL.TXT */
$=copies('FF'x, 1e5) /*no value should be larger than this. */
$=copies('FF'x, 1e5) /*no value should be larger than this. */