Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005829OCamlOCaml standard librarypublic2012-11-16 05:232012-12-19 02:39
Reporterberenger 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformIntel_x86_64OSLinuxOS Versionsqueeze/sid
Product Version4.00.0 
Target VersionFixed 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

-  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.

- 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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker