subroutine F_Expr_Sys(f_source, n, f_text)

character(132) f_source

character(132) line, f_text(n)
character(1) i_char(n), str*3, TAB, sp, eq, sc


!f_text(1:n) =' '

open(10, file =f_source, status ='old', form ='formatted', iostat =k_open)

if(k_open /=0) RETURN

! Build "i_char":
do i=1,n
write(i_char(i), '(I1)') i
enddo

TAB =char( ichar("	") )
sp =char(32)
eq ='='
sc=';'

WH_DO: DO WHILE (.not.EOF(10))
read(10, '(a)') line

! Supress leading blanks (if any):
line =adjustl(line)

! Replace leading tab(s) by space(s):
i =0
100 i =i+1
if(line(i:i) ==TAB) then
line(i:i) =sp
else
goto 200
endif

goto 100

! Supress leading blanks:
200 line =adjustl(line)


if(line(1:1) =='!') cycle WH_DO

ll =len_trim(line)

! Search in "line" for "f(1) ... f(n)" AND for '=":
do i =1,n
str ='f('//i_char(i)
i_f =index(line, str)
i_eq =index(line, eq)

if(i_f /=0 .and. i_eq /=0) then
!f_text(i) =trim(line)
!f_text(i) =str//')'//trim(line(i_eq:))
i_sc =index(line(i_f:), sc)

if(i_sc>0) then
i2 =i_sc+i_f
else
i2 =ll
endif

f_text(i) =trim(line(i_f:i2))
endif
enddo

ENDDO WH_DO

close(10)

END
