Original bug ID: 6649 Reporter: berke.durak Status: closed (set by @damiendoligez on 2016-03-21T16:14:02Z) Resolution: fixed Priority: low Severity: minor Version: 4.01.0 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
Bug description
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:
let x = +1;;
val x : int = 1
Steps to reproduce
int_of_string "+1";;
Exception: Failure "int_of_string".
Additional information
Scanf.sscanf "%d" accepts the +
The text was updated successfully, but these errors were encountered:
Original bug ID: 6649
Reporter: berke.durak
Status: closed (set by @damiendoligez on 2016-03-21T16:14:02Z)
Resolution: fixed
Priority: low
Severity: minor
Version: 4.01.0
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
Bug description
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:
let x = +1;;
val x : int = 1
Steps to reproduce
int_of_string "+1";;
Exception: Failure "int_of_string".
Additional information
Scanf.sscanf "%d" accepts the +
The text was updated successfully, but these errors were encountered: