You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi this is a great addon for Fortran programmer. I am hoping it can be even further enhanced/
allow multiple arguments after a switch: myapp --range 1.0 2.0 or myapp -r 1.0 2.0
This can be achieved by adding another parameter in the option_s struct such as nopts. Default can be nopts == 0 for no argument.
allow repeating switch: myapp --add file1 --add file2 and provide the occurrence of add
Are these implemented? If not, can you implement them? If you do not have time, I can help implement these through a pull request.
Thank you so much!
The text was updated successfully, but these errors were encountered:
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
Hi this is a great addon for Fortran programmer. I am hoping it can be even further enhanced/
myapp --range 1.0 2.0
ormyapp -r 1.0 2.0
This can be achieved by adding another parameter in the
option_s
struct such asnopts
. Default can be nopts == 0 for no argument.myapp --add file1 --add file2
and provide the occurrence ofadd
Are these implemented? If not, can you implement them? If you do not have time, I can help implement these through a pull request.
Thank you so much!
The text was updated successfully, but these errors were encountered: