integer function loca(i,j)
! Locul lui A(i,j) in Y(NY0+n*LIM):
common n, LIM, NY0

loca = NY0 +(i-1)*LIM + j -i +1
end function loca

