Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "range" CLA option along-side "choices" #73

Open
szaghi opened this issue Feb 1, 2017 · 0 comments
Open

add "range" CLA option along-side "choices" #73

szaghi opened this issue Feb 1, 2017 · 0 comments
Assignees

Comments

@szaghi
Copy link
Owner

szaghi commented Feb 1, 2017

Currently, a CLA can have the optional choices checker to verify if the passed argument is allowed. This is good for checking against a finite number of allowed values, but if one want to check against an infinite set values that must only be bounded into a range (e.g. if x in [0.2, 12.1) ) the choices option is not viable.

Thus add a new optional, e.g.

call cli%add(switch='--foo', range='[0.1, 20.)', required=.false., def='5.') ! 0.1 is include in the range, while 20. not

(trick: maybe temporary promote all check in real even if the CLA is integer)

@szaghi szaghi self-assigned this Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant