Millepede-II V04-17-03
Modules | Functions/Subroutines | Variables
mptext.f90 File Reference

Analyse text string. More...

Go to the source code of this file.

Modules

module  mptext
 Keyword position.
 

Functions/Subroutines

subroutine ratext (text, nums, dnum, mnum)
 Translate text. More...
 
subroutine rltext (text, ia, ib, nab)
 Analyse text range. More...
 
integer(mpi) function matint (pat, text, npat, ntext)
 Approximate string matching. More...
 

Variables

integer(mpi) mptext::keya
 start (position) of first keyword More...
 
integer(mpi) mptext::keyb
 end (position) of first keyword More...
 
integer(mpi) mptext::keyc
 end (position) of last keyword More...
 

Detailed Description

Analyse text string.

Author
Volker Blobel, University Hamburg, 2005-2009 (initial Fortran77 version)
Claus Kleinwort, DESY (maintenance and developement)

Definition in file mptext.f90.

Function/Subroutine Documentation

◆ matint()

integer(mpi) function matint ( character (len=*), intent(in)  pat,
character (len=*), intent(in)  text,
integer(mpi), intent(out)  npat,
integer(mpi), intent(out)  ntext 
)

Approximate string matching.

Approximate (parallel) string matching - case insensitive. Return number of matching characters (in same order) in strings PAT and TEXT, and number NPAT, NTEXT of characters of string PAT and string TEXT. Strings are considered from first to last non-blank character.

Example:

 MATCH = MATINT(' keYs ','keyWO RD',NPAT,NTEXT)
 returns MATCH=3, NPAT=4, NTEXT=8
Parameters
[in]patpattern
[in]texttext
[out]npatnumber of characters in pattern
[out]ntextnumber of characters in text
Returns
number of matching characters in pattern and text

Definition at line 308 of file mptext.f90.

References matint().

Referenced by matint(), and nufile().

◆ ratext()

subroutine ratext ( character (len=*), intent(in)  text,
integer(mpi), intent(out)  nums,
real(mpd), dimension(mnum), intent(out)  dnum,
integer(mpi), intent(in)  mnum 
)

Translate text.

Translate TEXT into arrays of double precision numbers DNUMS(NUMS). Text preceeding numbers is TEXT(KEYA:KEYB), if KEYB >= KEYA.

Parameters
[in]texttext
[out]numsnumber of numbers found
[out]dnumarray of numbers found
[in]mnumsize of dnum

Definition at line 50 of file mptext.f90.

References mptext::keya, mptext::keyb, and mptext::keyc.

Referenced by filetc(), and intext().

◆ rltext()

subroutine rltext ( character (len=*), intent(in)  text,
integer(mpi), intent(out)  ia,
integer(mpi), intent(out)  ib,
integer(mpi), intent(out)  nab 
)

Analyse text range.

Parameters
[in]texttext
[out]iaindex of first non-blank character, or =1
[out]ibindex of last non-blank character, or =0 - comment excluded
[out]nabindex of last non-blank character (=0 for blank text)

Definition at line 255 of file mptext.f90.

Referenced by filetc(), filetx(), and intext().