ADAS Subroutine xxprs1
subroutine xxprs1(ndmet,string,wno,cpl,npt,ipla,zpla,ifail)
C-----------------------------------------------------------------------
C
C ****************** fortran77 subroutine: xxprs1 *********************
C
C purpose: to analyse the tail character string of an level data line
C of an adf04 specific ion file into wave-number and sets of
C (parent identifier, effective zeta for the parent) pairs.
C
C unified version of baprs1, b9prs1, bbprs1, g5prs1 which is
C a replacement for these subroutines
C
C calling program: various
C
C notes: detect - level wave number which preceeds first '{'
C - sets of parent index contained in '{.}'
C followed by effective zeta
C nb. 'x' as first parent assignment means exclude ionisation
C from this level.
C no parent assignment means take lowest parent with
C zeta =1.
C lowest parent but no zeta means take zeta =1.
C if there is more than one parent then zeta's must be in.
C
C
C subroutine:
C
C input : (i*4) ndmet = maximum number of parents
C input : (c*(*))string = string to be parsed
C
C output: (r*8) wno = excitation wave number of level relative
C to lowest parent
C output: (c*1) cpl = lead parent for ionisation or 'x'
C output: (i*4) npt = number of parents detected
C output: (i*4) ipla() = parent indices.
C output: (r*8) zpla() = effective zeta for parent ipla()
C output: (i*4) ifail = 0 - subroutine concludes correctly
C 1 - fault detected in subroutine
C 2 - single ionisation potential detected
C
C (i*4) maxwrd = maximum number of words sought initially
C initially, finally number actually found
C (i*4) nfirst = first word to be extracted from string
C (i*4) ifirst() = index of first char. of word () in string
C (i*4) ilast() = index of last char. of word () in string
C (i*4) iwords = number of words found in string
C
C (l*4) lset = .true. - wave number part set
C .false. - wave number part not set
C (l*4) lwno = .true. - in the wave number part
C .false. - not in the wave number part
C (l*4) lprnt = .true. - in a parent specifier
C .false. - not in a parent specifier
C (l*4) lzeta = .true. - in a zeta specifier
C .false. - not in a zeta specifier
C (i*4) ic = general use
C (i*4) iabt = failure number from r8fctn
C (i*4) nchar = number of characters in substring
C (c*15) sstrng = isolated substring
C
C routines:
C routine source brief description
C -------------------------------------------------------------
C i4unit adas fetch unit number for output of messages
C r8fctn adas converts from character to real variable
C i4fctn adas converts from char. to integer variable
C xxword adas parses a string into separate words
C for ' ()<>{}' delimiters
C
C AUTHOR: HP Summers
C JA7.08, University of Strathclyde
C Tel: 0141-548-4196
C
C DATE: 04/12/02
C
C UPDATE: :
C
C-----------------------------------------------------------------------
CHARACTER CPL
CHARACTER*(*) STRING
INTEGER IFAIL, IPLA(NDMET), NDMET, NPT
REAL*8 WNO, ZPLA(NDMET)