function seek_and_print_f_jf(n, unit)

integer, intent(in) :: n, unit

character(132) f_source
character(2) i_char, j_char
integer width
character(132), allocatable :: f_text(:), jf_text(:)

! I) READ:
! FUNCTION:
f_source ='fcn.f90'
allocate(f_text(n))
f_text(:) =' '

do i =1,n
! Open "f_source" and read:
call F_Expr_Sys(f_source, n, 1, i, f_text(i))
enddo

! JACOBIAN:
f_source ='jfcn.f90'
allocate(jf_text(n*n))
jf_text(:) =' '

! Open "f_source" and read:
do i =1,n
do j =1,n

k =(i-1)*n +j
! Open "f_source" and read:
call F_Expr_Sys(f_source, n, 2, k, jf_text(k))
enddo
enddo

! II) PRINT to "unit":
! Function
do i=1,n
write(unit, '(1x, a)') trim(f_text(i))
enddo

!Jacobian
write(unit,*)
nu =min(n,4)
do i=1,n
do j=1,n
k =(i-1)*n+j
!write(unit, '(1x, a)') trim(jf_text(k))
write(unit, '(<nu>(1x, a, \))') trim(jf_text(k))//'  '
if(mod(k,n) ==0) write(unit,*)

enddo
enddo

seek_and_print_f_jf =0
deallocate(f_text)
deallocate(jf_text)

END

