code 34603;
procedure HESTGL3(N,A,B,X);value N;integer N;array A,B,X;
begin integer NM1,K,L,K1,L1;
    if N>2 then 
    begin for K:=2 step 1 until N do 
        for L:=1 step 1 until K-1 do B[K,L]:=0;
        NM1:=N-1;K:=1;
        for K1:= 2 step 1 until NM1 do 
        begin L1:=N;
            for L:=N-1 step -1 until K1 do 
            begin 
                HSH2COL(K,L,N,L,A[L,K],A[L1,K],A,B);A[L1,K]:=0;
                HSH2ROW3(1,N,L1,N,L,B[L1,L1],B[L1,L],A,B,X);
                B[L1,L]:=0;L1:=L
            end;K:=K1
        end 
    end 
end HESTGL3

        eop