| Anonymous | Login | Signup for a new account | 2013-05-19 12:42 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005571 | OCaml | OCaml general | public | 2012-04-02 23:39 | 2012-09-21 14:11 | ||||||
| Reporter | jfc | ||||||||||
| Assigned To | |||||||||||
| Priority | low | Severity | trivial | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.12.1 | ||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | |||||||||
| Summary | 0005571: Incorrect ordinal number in error message | ||||||||||
| Description | ocamlc forms some ordinal numbers incorrectly in error messages. The attached program causes an error message: Their 21th fields have different names, X and C. "21th" should be "21st". This replacement nth seems to do the right thing. let nth n = if n = 1 then "first" else let n_100 = n mod 100 and n_10 = n mod 10 in if n_10 = 1 && n_100 <> 11 then (string_of_int n) ^ "st" else if n_10 = 2 && n_100 <> 12 then (string_of_int n) ^ "nd" else if n_10 = 3 && n_100 <> 13 then (string_of_int n) ^ "rd" else string_of_int n ^ "th" | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0007265) gasche (developer) 2012-04-03 08:23 |
Just reading the PR title, I first thought it was an April joke, and found it funny. "?^? not printed correctly". |
|
(0007266) xleroy (administrator) 2012-04-03 10:33 |
I'd suggest avoiding adding code for this issue and change the message instead. "Fields number 21 have..." |
|
(0008026) doligez (manager) 2012-09-06 16:47 |
For the record, I am very much in favor of Xavier's solution. Our core business is not natural language processing. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-04-02 23:39 | jfc | New Issue | |
| 2012-04-02 23:39 | jfc | File Added: test.ml | |
| 2012-04-03 08:23 | gasche | Note Added: 0007265 | |
| 2012-04-03 08:23 | gasche | Status | new => acknowledged |
| 2012-04-03 10:33 | xleroy | Note Added: 0007266 | |
| 2012-09-06 16:47 | doligez | Note Added: 0008026 | |
| 2012-09-06 16:47 | doligez | Target Version | => 4.00.1+dev |
| 2012-09-21 14:11 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |