SUBROUTINE CMLSTS(MAXLST,LINE,SCANPT, SCNTRM,TRMTYP,SLIST,STRLEN) NOLINEUP C C SCAN A COMMAND ARGUMENT STRING 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 . SLIST(,)- DESTINATION FOR LIST VALUES - CHAR*1 C . STRLEN()- LENGTHS OF STRINGS C INCLUDE (SCANLIB.PARAMS) C CHARACTER*1 LINE(1), SLIST(TOKNSZ,IABS(MAXLST)) INTEGER MAXLST,SCANPT, SCNTRM,TRMTYP INTEGER STRLEN(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 STRLEN(LINDEX) = NCHARS DO FOR I = 1,NCHARS SLIST(I,LINDEX) = TOKEN(I) END FOR 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