
   function linearIndexOk:bool;
    var
     i,j,k,l:int;
     testFirst,testSecond,testThird:array[defaultInt..dataMax]of int;
     result:bool;
    begin
     result := true;
     for i := 0 to dataCount - 1 do if result then
      begin
       j := firstIn[i];
       k := secondIn[i];
       l := thirdIn[i];
       write('j = ',j:0);
       write('  k = ',k:0);
       writeln('  l = ',l:0);
       result := i = linearIndex(j,k,l);
      end;
     linearIndexOk := result;
    end;

