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?
to your account
Original bug ID: 6649
Status: closed (set by @damiendoligez on 2016-03-21T16:14:02Z)
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: standard library
Related to: #5829 #6296
Monitored by: lelf @hcarty
The documentation states:
"Raise Failure "int_of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int."
But starting an integer with a + is valid:
val x : int = 1
Exception: Failure "int_of_string".
Scanf.sscanf "%d" accepts the +
The text was updated successfully, but these errors were encountered:
Comment author: @damiendoligez
Note that #5936 will probably remove the +1 syntax from the language.
Since scanf uses the underlying C implementation, it's less likely to be "fixed" in the same way.
Sorry, something went wrong.
Comment author: chrismamo1
This seems to have bee resolved by #2613 ( #222 )
Indeed it was resolved by #222. Thanks.
No branches or pull requests