f90getopt
f90getopt copied to clipboard
ifort issue with getopt-string
some thing very interesting:
using ifort on windows, it will stop after paring the first option using the example
however, it runs fine, if you change the sample by calling the function outside the case selection. gfortran does not have this issue.
do
a = getopt("ab:h", opts)
select case(a)
case(char(0)) ! When all options are processed
exit
case("a")
print*, "option alpha/a"
case("b")
print*, "option beta/b=", trim(optarg) ! "trim" is quite useful to avoid trailing blanks
case("h")
print*, "help-screen"
end select
end do
Originally posted by @ougx in https://github.com/haniibrahim/f90getopt/issues/4#issuecomment-1474117887
Thank you for reporting this issue. I will change the doc for ifort compatibility
Issue fixed in current commit.