SUBROUTINE CMLSTI(MAXLST,LINE,SCANPT, SCNTRM,TRMTYP,ILIST) NOLINEUP C C SCAN A COMMAND ARGUMENT INTEGER LIST C C INPUTS-- C . MAXLST - IABS(MAXLST) IS MAXIMUM NUMBER OF ITEMS ALLOWED IN C . THE LIST. THE LIST IS POSITIONAL IF MAXLST LT 0 C . LINE() - LINE OF CHARACTERS TO BE SCANNED - CHAR*1(N) C . SCANPT - INDEX OF CHARACTER IN LINE() TO START SCANNING C C OUTPUTS-- C . SCNTRM - INDEX OF CHARACTER IN LINE() WHICH STOPPED SCAN C . TRMTYP - PUNCTUATION TYPE CODE FOR LINE(SCNTRM) C . ILIST()- DESTINATION FOR LIST VALUES C INCLUDE (SCANLIB.PARAMS) CHARACTER*1 LINE(1) INTEGER MAXLST,SCANPT, SCNTRM,TRMTYP,ILIST(IABS(MAXLST)) CHARACTER*1 TOKEN(TOKNSZ) INTEGER SCAN,NCHARS C SCAN = SCANPT TRMTYP = 0 LINDEX = 1 DO WHILE (LINDEX.LE.IABS(MAXLST) .AND. TRMTYP.LE.LSTSEP) IF (MAXLST.LT.0) THEN CALL CMPOSL(LINE,SCAN, SCNTRM,TOKEN,NCHARS,TRMTYP) ELSE CALL CMTOKN(LINE,SCAN, SCNTRM,TOKEN,NCHARS,TRMTYP) ENDIF IF (NCHARS.GT.0 .OR. TRMTYP.LT.KEYSEP) THEN CALL CMINTG(TOKEN,NCHARS, ILIST(LINDEX),ISTAT) IF (ISTAT.NE.0) THEN C *** ERROR 4 - INVALID INTEGER ITEM CALL CMERMS(4,TOKEN,NCHARS) ENDIF ENDIF SCAN = SCNTRM + 1 LINDEX = LINDEX + 1 END WHILE C C IN CASE MAXLST WAS HIT BEFORE LIST EXHAUSTED, KEEP SCANNING -- C DO WHILE (TRMTYP.LE.LSTSEP) CALL CMTOKN(LINE,SCAN, SCNTRM,TOKEN,NCHARS,TRMTYP) C *** ERROR 6 - TOO MANY LIST ITEMS CALL CMERMS(6,TOKEN,NCHARS) SCAN = SCNTRM + 1 END WHILE RETURN END