LOGICAL FUNCTION INTLIST( ENAME, EDESC, NMAX, NCNT, ILIST )
LOGICAL FUNCTION REALIST( ENAME, EDESC, NMAX, NCNT, RLIST )
LOGICAL FUNCTION STRLIST( ENAME, EDESC, NMAX, NCNT, SLIST )
CHARACTER*(*) ENAME ! in: environment variable for the list
CHARACTER*(*) EDESC ! in: environment variable description
INTEGER NMAX ! in: dimension for list
INTEGER NCNT ! out: actual number of entries in list
INTEGER ILIST( NMAX ) ! out: array of values found
REAL RLIST( NMAX ) ! out: array of values found
CHARACTER*(*) SLIST( NMAX ) ! out: array of string values found
strtok().
NCNT and
the values in the array [I|R|S]LIST.
Environment-variable lists may have an optional LIST:
prefix, followed by a sequence of comma-delimited values. Blanks
are not significant (and are skipped).
Return FALSE if ENAME is a bad environment
variable, if there are no entries in the list or if the list does not
parse and evaluate correctly, or if the array would have overflowed
(i.e., has more than NMAX entries.
setenv <logical name> [LIST:]<quoted, comma-delimited list of integers, reals, or strings>
NMAX entries in the list.
...
INTEGER NMAX
PARAMETER ( NMAX = ... )
...
INTEGER ILIST( NMAX )
INTEGER NCNT
...
IF ( .NOT. INTLIST( 'MYLIST',
& 'This is my comma-delimited list of INTEGERs',
& NMAX, NCNT, ILIST ) ) THEN
!! either bad environment variable, invalid INTEGERs
!! in the list, list had no entries, or list overflowed
...
END IF
...
Next: LOCATC, LOCAT1, LOCAT2, LOCAT3, LOCAT4, LOCATR1, LOCATR2, LOCATR3, LOCATR4
To: Models-3/EDSS I/O API: The Help Pages