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

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

