      SUBROUTINE stsym(string, iparse, dset, dset_new, *)
c        fwj haberl march 1988
c        subroutine for XPLOT to plot symbols
c     args:
c     string	c*	i/r: input string to be parsed
c     iparse	i4	i/r: current position
      INCLUDE 'xplot.inc'
      INTEGER*4 iparse, iflag, idelim, nret, i
      INTEGER*4 dset, dset_new, nset, irnglw, irnghi
      INTEGER*2 isym
      CHARACTER*(*) string
      LOGICAL qfirst
 
      CALL xgtint(string, iparse, 1, 'symb no', 1, isym, nret, iflag,
     &            idelim)
      IF (iflag.LT.0) THEN
         GOTO 900
      ENDIF
      iflag = 0
      nset = dset + dset_new
      irnglw = nset
      irnghi = nset
      qfirst = .TRUE.
      DO WHILE (iflag.EQ.0)
         CALL xgtrng(string, iparse, 1, 'data set no', 'for symbol',
     &               irnglw, irnghi, 1, nset, 1, .FALSE., iflag, idelim)
         IF (iflag.EQ.0 .OR. (iflag.EQ.1 .AND. qfirst)) THEN
            qfirst = .FALSE.
            DO i = irnglw, irnghi
               symbol(i) = isym
            ENDDO
         ENDIF
      ENDDO
      RETURN
 900  CONTINUE
c     error case
      RETURN 1
      END
