      SUBROUTINE LNOPTS (NLINES, SYMSIZ, INTSYM, ISYMNO, LINSYL, ICURS)
      IMPLICIT NONE
C
      INCLUDE MATLAB$KOM:SIZEPARMS.INC
C
C
C ***      SET THE LINE SYMBOL OPTIONS
C
      INTEGER NLINES, INTSYM(LINES), ISYMNO(LINES), LINSYL(LINES)
      REAL SYMSIZ(LINES)
      CHARACTER*(*) ICURS
C
      INCLUDE MATLAB$KOM:IOP.KOM
      INCLUDE MATLAB$KOM:MATPLT.KOM
C
      CHARACTER*1 ANS
      INTEGER IANS, LSTART, LEND, LINENO, I
C
C
620   CONTINUE
      CALL DSSTRN (' PLEASE SELECT A LINE OPTION', 1)
      CALL DSSTRN (' [1] CHOOSE LINE SYMBOL TYPE', 1)
      CALL DSSTRN (' [2] CHOOSE LINE PATTERN TYPE', 1)
      CALL DSSTRN (' [3] RETURN TO PREVIOUS MENU', 1)
      CALL DSCURS (ICURS)
      CALL VALGET (0, IANS, 'I')
      GO TO  (460, 660, 900), IANS
      CALL MENUER (3)
      GO TO 620
C
460   CONTINUE
      LSTART = 1
      LEND = 1
      IF (NLINES.GT.1) THEN
        CALL CHKEND
        CALL DSSTRN (' CHOOSE SYMBOLS FOR ALL LINES?', 1)
        CALL DSCURS (ICURS)
        READ (RTE, 463) ANS
463     FORMAT (A1)
        IF (WIO.NE.0) WRITE (WIO, 464) ANS
464     FORMAT (1X, A1)
        IF (ANS.NE.'Y' .AND. ANS.NE.'y' .AND.
     .      ANS.NE.'N' .AND. ANS.NE.'n') THEN
          CALL DSERR ('ERROR.  PLEASE ANSWER YES (Y) OR NO (N)')
          GO TO 460
        ENDIF
        IF (ANS.EQ.'Y' .OR. ANS.EQ.'y') THEN
          LSTART = 1
          LEND = NLINES
        ELSE
466       CONTINUE
          CALL CHKEND
          CALL DSSTRN (' PLEASE CHOOSE THE LINE NUMBER', 1)
          CALL DSCURS (ICURS)
          CALL VALGET (0, LINENO, 'I')
          IF (LINENO.GT.NLINES) THEN
            CALL MENUER (NLINES)
            GO TO 466
          ENDIF
          LSTART = LINENO
          LEND = LINENO
        ENDIF
      ENDIF
C
      DO 476 I = LSTART, LEND
468     CONTINUE
        CALL CHKEND
        CALL DSSTRN (' FOR LINE NUMBER ', 0)
        CALL DSWDI (I, 0)
        CALL DSSTRN (' PLEASE CHOOSE AN OPTION', 1)
        CALL DSSTRN (' [1] NO SYMBOL', 1)
        CALL DSSTRN (' [2] TRIANGLE', 1)
        CALL DSSTRN (' [3] BOX', 1)
        CALL DSSTRN (' [4] DIAMOND', 1)
        CALL DSSTRN (' [5] HOURGLASS', 1)
        CALL DSSTRN (' [6] RETURN TO LINE OPTIONS MENU', 1)
        CALL DSCURS (ICURS)
        CALL VALGET (0, IANS, 'I')
        GO TO  (475, 470, 470, 470, 470, 900), IANS
        CALL MENUER (6)
        GO TO 468
C
470     CONTINUE
        ISYMNO(I) = IANS-1
471     CONTINUE
        CALL CHKEND
        CALL DSSTRN (
     .      ' ENTER THE SYMBOL SIZE IN CM (BLANK LINE = DEFAULT)', 1)
        CALL DSCURS (ICURS)
        CALL VALGET (SYMSIZ(I), 0, 'F')
        CALL DSSTRN (' ENTER THE SYMBOL INTERVALS', 1)
        CALL DSCURS (ICURS)
        CALL VALGET (0, INTSYM(I), 'I')
        GO TO 476
C
475     CONTINUE
        ISYMNO(I) = IANS-1
476   CONTINUE
      GO TO 620
C
660   CONTINUE
      LSTART = 1
      LEND = 1
      IF (NLINES.GT.1) THEN
        CALL CHKEND
        CALL DSSTRN (' CHOOSE LINE STYLES FOR ALL LINES?', 1)
        CALL DSCURS (ICURS)
        READ (RTE, 463) ANS
        IF (WIO.NE.0) WRITE (WIO, 464) ANS
        IF (ANS.NE.'Y' .AND. ANS.NE.'y' .AND.
     .      ANS.NE.'N' .AND. ANS.NE.'n') THEN
          CALL DSERR ('ERROR. PLEASE ANSWER YES (Y) OR NO (N)')
          GO TO 660
        ENDIF
        IF (ANS.EQ.'Y' .OR. ANS.EQ.'y') THEN
          LSTART = 1
          LEND = NLINES
        ELSE
666       CONTINUE
          CALL CHKEND
          CALL DSSTRN (' PLEASE CHOOSE THE LINE NUMBER', 1)
          CALL DSCURS (ICURS)
          CALL VALGET (0, LINENO, 'I')
          IF (LINENO.GT.NLINES) THEN
            CALL MENUER (NLINES)
            GO TO 666
          ENDIF
          LSTART = LINENO
          LEND = LINENO
        ENDIF
      ENDIF
C
      DO 675 I = LSTART, LEND
667     CONTINUE
        CALL CHKEND
        CALL DSSTRN (' FOR LINE NUMBER ', 0)
        CALL DSWDI (I, 0)
        CALL DSSTRN (' PLEASE CHOOSE A LINE STYLE', 1)
        CALL DSSTRN (' [1] SOLID LINE', 1)
        CALL DSSTRN (' [2] LONG DASH', 1)
        CALL DSSTRN (' [3] SHORT DASH', 1)
        CALL DSSTRN (' [4] DOT DASH', 1)
        CALL DSSTRN (' [5] RETURN TO LINE OPTIONS MENU', 1)
        CALL DSCURS (ICURS)
        CALL VALGET (0, IANS, 'I')
        GO TO  (670, 670, 670, 670, 620), IANS
C
        CALL MENUER (5)
        GO TO 667
C
670     CONTINUE
        LINSYL(I) = IANS
C
675   CONTINUE
      GO TO 620
C
900   CONTINUE
      RETURN
      END
