Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005829OCamlOCaml standard librarypublic2012-11-16 05:232014-07-30 20:59
Reporterberenger 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionopen 
PlatformIntel_x86_64OSLinuxOS Versionsqueeze/sid
Product Version4.00.0 
Target Version4.02.1+devFixed in Version 
Summary0005829: int_of_string failure
DescriptionThis fails:
int_of_string " 123";;
Exception: (Failure int_of_string).

While this works:
float_of_string " 123";;
- : float = 123.

I am a little surprised.

Regards,
F.
Steps To Reproduceint_of_string " 1";;
Additional InformationThese also fail:
# int_of_string "1 ";;
Exception: Failure "int_of_string".
# float_of_string "1.0 ";;
Exception: Failure "float_of_string".
TagsNo tags attached.
Attached Files

- Relationships
related to 0006296acknowledged inconsistent behavior of float_of_string (compare to "ints"_of_string) 

-  Notes
(0008518)
frisch (developer)
2012-11-16 17:50

(Downgrading severity from crash to minor: it's a matter of choice whether those functions should ignore leading/trailing whitespace.)
(0008628)
berenger (reporter)
2012-12-19 02:39

Consistency in the choice would be nice.
(0010810)
hhugo (reporter)
2014-01-18 08:34

http://caml.inria.fr/mantis/view.php?id=6296 [^]

- Issue History
Date Modified Username Field Change
2012-11-16 05:23 berenger New Issue
2012-11-16 17:50 frisch Note Added: 0008518
2012-11-16 17:50 frisch Severity crash => minor
2012-12-19 02:39 berenger Note Added: 0008628
2013-06-28 17:34 doligez Status new => confirmed
2013-06-28 17:34 doligez Target Version => 4.02.0+dev
2013-07-12 18:15 doligez Target Version 4.02.0+dev => 4.01.1+dev
2014-01-18 08:34 hhugo Note Added: 0010810
2014-01-18 08:36 gasche Relationship added related to 0006296
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-30 20:59 doligez Target Version 4.02.0+dev => 4.02.1+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker