<pre>function makeColumns TXT,PL,NC,LR  put trunc(LR/NC) into LC  put the number of lines in TXT into NR  put PL*NC into NL  put 1 + trunc(NR/NL) into NP  repeat with P = 1 to NP    put 1 + (NL * (P - 1)) into AA    put AA + NL - 1 into ZZ    repeat with L = AA to min(AA + PL - 1,ZZ)      repeat with C = 1 to NC        put pad(line (L + PL * (C - 1)) of TXT,LC) after T      end repeat      put return after T    end repeat  end repeat  return Tend makeColumns</pre>