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

ParameterSet cannot handle boolean #2758

Closed
ye-luo opened this issue Oct 15, 2020 · 4 comments · Fixed by #4192
Closed

ParameterSet cannot handle boolean #2758

ye-luo opened this issue Oct 15, 2020 · 4 comments · Fixed by #4192
Assignees
Labels

Comments

@ye-luo
Copy link
Contributor

ye-luo commented Oct 15, 2020

Describe the bug
ParameterSet::add(bool) doesn't parse bool correctly.
The most funny logic is fliping value if the input entry is empty.

ref_ = !ref_; //flip the bit

Expected behavior
parse yes/no correctly

@prckent
Copy link
Contributor

prckent commented Oct 15, 2020

!!!

Presumably the fix will be to default to true if not present.

@ye-luo
Copy link
Contributor Author

ye-luo commented Oct 15, 2020

!!!

Presumably the fix will be to default to true if not present.

"yes"/"no" will be the only acceptable value, the code should stop if empty value is given.
if the whole entry is not given, it is the default value as listed in the manual.

@prckent
Copy link
Contributor

prckent commented Oct 15, 2020

Good solution.

There might be a few input files to update in our tests and examples.

@ye-luo
Copy link
Contributor Author

ye-luo commented Aug 19, 2022

Another observation #4126 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants