SUBROUTINE CMLSTR(MAXLST,LINE,SCANPT, SCNTRM,TRMTYP,RLIST) NOLINEUP C C SCAN A COMMAND ARGUMENT REAL 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 . RLIST()- DESTINATION FOR LIST VALUES C INCLUDE (SCANLIB.PARAMS) C CHARACTER*1 LINE(1) INTEGER MAXLST,SCANPT, SCNTRM,TRMTYP REAL RLIST(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 CALL CMREAL(TOKEN,NCHARS, RLIST(LINDEX),ISTAT) IF (ISTAT.NE.0) THEN C *** ERROR 5 - INVALID REAL ITEM CALL CMERMS(5,TOKEN,NCHARS) 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