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

Parser should probably error when scientific notation is entered incorrectly #10310

Closed
mangerij opened this issue Nov 24, 2017 · 0 comments
Closed
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.

Comments

@mangerij
Copy link
Contributor

mangerij commented Nov 24, 2017

Rationale

Scientific notation can sometimes be entered as a typo and the Parser will not complain.

Description

For example, if you accidentally add "1.0ee-5" or "1.0-5" in an input file instead of 1.0e-5, then the Parser won't complain and you have to find the problem yourself.

Impact

Easier to use. LEss error prone input files.

rwcarlsen added a commit to rwcarlsen/moose that referenced this issue Nov 27, 2017
stoi and stod functions are quite permissive and can ignore part of the
input string leaving it not entirely parsed.  Sometimes this could
result in invalid number strings being parsed as valid.  For example
"3ee10" is parsed as the value "3".  This change fixes that and requires
sto[i/d] to parse the entire string.  Any corresponding errors are not
added to the _errmsg collection variable and printed together with
other errors all at once instead of one at a time.

fixes idaholab#10310
rwcarlsen added a commit to rwcarlsen/moose that referenced this issue Nov 27, 2017
stoi and stod functions are quite permissive and can ignore part of the
input string leaving it not entirely parsed.  Sometimes this could
result in invalid number strings being parsed as valid.  For example
"3ee10" is parsed as the value "3".  This change fixes that and requires
sto[i/d] to parse the entire string.  Any corresponding errors are not
added to the _errmsg collection variable and printed together with
other errors all at once instead of one at a time.

fixes idaholab#10310
@permcody permcody added C: Modules P: normal A defect affecting operation with a low possibility of significantly affects. T: task An enhancement to the software. C: Framework T: defect An anomaly, which is anything that deviates from expectations. and removed C: Modules T: task An enhancement to the software. labels Nov 27, 2017
rwcarlsen added a commit to rwcarlsen/moose that referenced this issue Nov 27, 2017
stoi and stod functions are quite permissive and can ignore part of the
input string leaving it not entirely parsed.  Sometimes this could
result in invalid number strings being parsed as valid.  For example
"3ee10" is parsed as the value "3".  This change fixes that and requires
sto[i/d] to parse the entire string.  Any corresponding errors are not
added to the _errmsg collection variable and printed together with
other errors all at once instead of one at a time.

fixes idaholab#10310
rwcarlsen added a commit to rwcarlsen/moose that referenced this issue Nov 29, 2017
stoi and stod functions are quite permissive and can ignore part of the
input string leaving it not entirely parsed.  Sometimes this could
result in invalid number strings being parsed as valid.  For example
"3ee10" is parsed as the value "3".  This change fixes that and requires
sto[i/d] to parse the entire string.  Any corresponding errors are not
added to the _errmsg collection variable and printed together with
other errors all at once instead of one at a time.

fixes idaholab#10310
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.
Projects
None yet
Development

No branches or pull requests

2 participants