n class="p">)</span> <span class="o">=</span> <span class="n">ii</span>
      <span class="n">enddo</span>
      <span class="n">jptr</span><span class="p">(</span><span class="n">n</span> <span class="o">+</span><span class="mi">1</span><span class="p">)</span> <span class="o">=</span> <span class="n">ntot</span> <span class="o">+</span><span class="mi">1</span>

      <span class="c">! columns are already sorted; rows are now sorted for each row value</span>
      <span class="c">!------------------------