50SUBROUTINE ratext(text,nums,dnum,mnum)
67 CHARACTER (LEN=*),
INTENT(IN) :: text
68 INTEGER(mpi),
INTENT(OUT) :: nums
69 INTEGER(mpi),
INTENT(IN) :: mnum
70 REAL(mpd),
INTENT(OUT) :: dnum(mnum)
73 INTEGER(mpi),
PARAMETER :: ndim=1000
74 INTEGER(mpi),
DIMENSION(2,ndim):: icd
75 CHARACTER (LEN=1) :: ch
76 REAL(mpd) :: dic(ndim)
78 INTEGER(mpi) :: icdt(ndim)
86 IF(text(1:1) ==
'*')
RETURN
91 IF(lent == 0.AND.(text(i:i) ==
'!'.OR.text(i:i) ==
'%')) lent=i
92 IF(text(i:i) /=
' ') last=i
94 IF(lent == 0) lent=last+1
118 IF(ich >= num.AND.ich <= num+9) ic=5
131 IF(icdt(i) == 5)
THEN
133 DO k=icd(1,i),icd(2,i)
134 dumber=10.0_mpd*dumber+real(ichar(text(k:k))-num,mpd)
142 IF(icdt(i) == 1)
THEN
144 IF(icdt(i-1) == 5.AND.icd(2,i-1)+1 == icd(1,i)) icode=1
145 IF(icdt(i+1) == 5.AND.icd(1,i+1)-1 == icd(2,i)) icode=icode+2
149 ELSE IF(icode == 2)
THEN
150 dic(i)=10.0d0**(icd(1,i+1)-icd(2,i+1)-1)*dic(i+1)
154 ELSE IF(icode == 3)
THEN
155 dic(i-1)=dic(i-1)+ 10.0d0**(icd(1,i+1)-icd(2,i+1)-1)*dic(i+1)
156 icd(2,i-1)=icd(2,i+1)
165 IF(icdt(i) == 6.AND.text(icd(1,i):icd(2,i)) ==
' ') icdt(i)=0
166 IF(icdt(i) /= 0)
THEN
177 IF(icdt(i) == 2.OR.icdt(i) == 3)
THEN
178 IF(icdt(i+1) == 5)
THEN
180 IF(icdt(i) == 3) dic(i+1)=-dic(i+1)
188 IF(icdt(i) == 6.AND.text(icd(1,i):icd(2,i)) ==
' ') icdt(i)=0
189 IF(icdt(i) /= 0)
THEN
200 IF(icdt(i) == 4)
THEN
201 IF(icdt(i-1) == 5.AND.icdt(i+1) == 5)
THEN
202 icd(2,i-1)=icd(2,i+1)
203 dic(i-1)=dic(i-1)*10.0d0**dic(i+1)
212 IF(icdt(i) == 5)
THEN
217 IF (nums >= mnum)
EXIT
229 IF(text(i:i) /=
' ')
THEN
236 IF(text(i:i) /=
' ')
THEN
262 CHARACTER (LEN=*),
INTENT(IN) :: text
263 INTEGER(mpi),
INTENT(OUT) :: ia
264 INTEGER(mpi),
INTENT(OUT) :: ib
265 INTEGER(mpi),
INTENT(OUT) :: nab
274 IF(text(i:i) /=
' ') nab=i
275 IF((i == 1.AND.text(1:1) ==
'*').OR.text(i:i) ==
'!')
THEN
285 IF(ia == 0.AND.text(i:i) /=
' ') ia=i
286 IF(text(i:i) /=
' ') ib=i
308INTEGER(mpi) FUNCTION matint(pat,text,npat,ntext)
324 CHARACTER (LEN=*),
INTENT(IN) :: pat
325 CHARACTER (LEN=*),
INTENT(IN) :: text
326 INTEGER(mpi),
INTENT(OUT) :: npat
327 INTEGER(mpi),
INTENT(OUT) :: ntext
330 CHARACTER (LEN=26) :: chu
331 CHARACTER (LEN=26) :: chl
332 INTEGER(mpi) :: nj(0:255)
334 DATA chu/
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
335 DATA chl/
'abcdefghijklmnopqrstuvwxyz'/
345 nj(ichar(chl(i:i)))=ichar(chu(i:i))
352 IF(text(i:i) /=
' ')
GO TO 10
357 IF(text(i:i) /=
' ') itb=i
363 IF(pat(i:i) /=
' ')
GO TO 20
368 IF(pat(i:i) /=
' ') ipb=i
376 DO WHILE (ip <= ipb.AND.jt <= itb)
377 jc=nj(ichar(text(jt:jt)))
378 ic=nj(ichar(pat(ip:ip)))
384 IF (ipb-ip == itb-jt)
THEN
388 ELSE IF (ipb-ip > itb-jt)
THEN
integer(mpi) function matint(pat, text, npat, ntext)
Approximate string matching.
subroutine ratext(text, nums, dnum, mnum)
Translate text.
subroutine rltext(text, ia, ib, nab)
Analyse text range.
integer(mpi) keyb
end (position) of first keyword
integer(mpi) keya
start (position) of first keyword
integer(mpi) keyc
end (position) of last keyword