<?xml version="1.0" encoding="windows-1252"?>
<node id="1007584" title="Re: Reading files n lines a time" created="2012-12-06 09:19:00" updated="2012-12-06 09:19:00">
<type id="11">
note</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
Right now you consider 4 lines ... soon it may be 6.  Plan ahead.  Load the lines into an array by pushing them onto the end of it; noting when you've reached end-of-file e.g. if there should be less than 4 lines or you've run out.  Each time you loop back, shift the first line off the array and push a new line onto the other end.  The lines can be reached directly by indexes 0..3.</field>
<field name="root_node">
1007560</field>
<field name="parent_node">
1007560</field>
<field name="reputation">
6</field>
</data>
</node>
