1 C-----------------------------------------------------------------------
2 SUBROUTINE FPARSEI
(CARG
,MARG
,KARG
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
5 C SUBPROGRAM: FPARSER PARSE INTEGERS FROM A CHARACTER STRING
6 C PRGMMR: IREDELL ORG: NP23 DATE:1998-09-03
8 C ABSTRACT: THIS SUBPROGRAM EXTRACTS INTEGERS FROM A FREE-FORMAT
9 C CHARACTER STRING. IT IS USEFUL FOR PARSING COMMAND ARGUMENTS.
11 C PROGRAM HISTORY LOG:
14 C USAGE: CALL FPARSEI(CARG,MARG,KARG)
16 C INPUT ARGUMENT LIST:
17 C CARG - CHARACTER*(*) STRING OF ASCII DIGITS TO PARSE.
18 C INTEGERS MAY BE SEPARATED BY A COMMA OR BY BLANKS.
19 C MARG - INTEGER MAXIMUM NUMBER OF INTEGERS TO PARSE.
21 C OUTPUT ARGUMENT LIST:
22 C KARG - INTEGER (MARG) NUMBERS PARSED.
23 C (FROM 0 TO MARG VALUES MAY BE RETURNED.)
26 C TO DETERMINE THE ACTUAL NUMBER OF INTEGERS FOUND IN THE STRING,
27 C KARG SHOULD BE SET TO FILL VALUES BEFORE THE CALL TO FPARSEI AND
28 C THE NUMBER OF NON-FILL VALUES SHOULD BE COUNTED AFTER THE CALL.
31 C LANGUAGE: FORTRAN 90
36 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
37 READ(CARG
,*,IOSTAT
=IOS
) KARG
38 C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -