22 integer(kind=plint) :: mode
23 integer(kind=plint) :: maxargs, iargs, numargs, index, maxindex
24 parameter(maxindex = maxlen/4_plint)
25 parameter(maxargs=20_plint)
26 character (len=maxlen) :: arg
27 integer(kind=plint),
dimension(maxindex, maxargs) :: iargsarr
28 numargs = command_argument_count()
29 if(numargs.lt.0_plint)
then
31 write(0,
'(a)')
'plparseopts: negative number of arguments'
34 if(numargs+1_plint.gt.maxargs)
then
35 write(0,
'(a)')
'plparseopts: too many arguments'
38 do 10 iargs = 0_plint, numargs
39 call get_command_argument(iargs, arg)
41 s1 = transfer( string1, s1 )
42 do 5 index = 1_plint, maxindex
43 iargsarr(index, iargs+1) = s1(index)
46 call plparseopts7(numargs+1, iargsarr, mode, maxindex*4)