subroutine me_parse_final (string, index, line_number) * * This routine will parse string into a variable name * It should look something like, x, y, theta, phi, p * * 22-May-94, Pat Welch, Oregon State University (tpw@physics.orst.edu) * implicit none character*(*) string ! ME name integer index ! index of x, y, theta, phi integer line_number integer length integer lnblnk ! func ret non-blank length index = -1 ! initial value length = lnblnk(string) ! length of non-blank string if (string(1:length) .eq. 'x') then index = 1 else if (string(1:length) .eq. 'y') then index = 3 else if (string(1:length) .eq. 'theta') then index = 2 else if (string(1:length) .eq. 'phi') then index = 4 else if (string(1:length) .eq. 'p') then index = 5 else write (*,*) ' Unrecognized matrix element name, ', string if (line_number .gt. 0) write (*,*) ' Line #', line_number endif end