SUBROUTINE ADDCEND(carray,maxspace,itype) C ADDCEND ADDS THE C END OF STRING CHARACTER (\0) TO C THE END OF A STRING cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c Passed Variables: c c carray - character string to be examined c maxspace - maximum number of characters in character array c itype: 0 = set at first space c 1 = set after last character c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 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.' ' .and. nspace.eq.0) nspace=n if ( itype .eq. 1 .and. * nspace.gt.0 .and. carray(n:n).ne.' ' ) nspace=0 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 c**************************************************************** c c Add the C end of string character c c**************************************************************** carray(nspace:nspace) = CHAR(0) return end