subroutine G_Expr(g_source, g_text, kod8)
! kod8 =0: Real(4); #0: Real(8)
character(132) g_source
character(132) g_text, line
character(1) TAB*1, sp*1


!g_text ='g(x) ='

open(10, file =g_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="
if(kod8 ==0) then
ig  =index(line, "g =")
ig1 =index(line, "g=")

else
ig  =index(line, "g8 =")
ig1 =index(line, "g8=")
endif

if(ig /=0 .or. ig1 /=0) then
g_text =trim(line)
exit
endif

ENDDO WH_DO

close(10)

END
