subroutine F_Expr(f_source, f_text)

character(132) f_source
character(132) line, f_text
character(1) TAB*1, sp*1


f_text ='f(x) ='

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

if(k_open /=0) return

TAB =char( ichar("	") )
sp =char(32)

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:3) =='g =' .or. line(1:2) =='g=') then

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

! Search in "line" for "g =" or "g="
ig  =index(line, "f =")
ig1 =index(line, "f=")
if(ig /=0 .or. ig1 /=0) then
f_text =trim(line)
exit
endif

ENDDO WH_DO

close(10)

END
