SUBROUTINE FINDCHAR(nspace,carray,maxspace,cfind) C FINDCHAR FINDS THE FIRST OCCURRANCE OF A DESIRED CHARACTER IN C A CHARACTER STRING. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Passed Variables: c c nspace - distance, in characters, from the beginning of c the character string at which the first occurance c of the desired character is found c carray - character string to be examined c maxspace - maximum number of characters in character array c cfind - character to be searched for c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc character*1 cfind character*(*) carray cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Initialize nspace c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc nspace=0 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Look at each character in string. If a character matches c the desired character, set the value of nspace. c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc do 50 n=1,maxspace if ( carray(n:n).eq.cfind .and. nspace.eq.0) nspace=n 50 continue cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c If the desired character is not found, set nspace to c maxspace+1. c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc if ( nspace.eq.0 ) nspace=maxspace+1 return end