| Anonymous | Login | Signup for a new account | 2013-05-18 20:24 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 | |||||||
| 0005605 | OCaml | OCaml standard library | public | 2012-05-03 04:48 | 2012-05-03 13:45 | |||||||
| Reporter | furuse | |||||||||||
| Assigned To | protz | |||||||||||
| Priority | high | Severity | major | Reproducibility | always | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | ||||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0005605: Scanf.scanf works differently around "@" char in 4.01.0+dev2 | |||||||||||
| Description | In OCaml 3.12.1, # Scanf.scanf "%S %S@\n" (fun x y -> (x,y));; "hello" "world" - : string * string = ("hello", "world") # In OCaml 4.01.0+dev2_2012-04-17, # Scanf.scanf "%S %S@\n" (fun x y -> (x,y));; "hello" "world" Exception: Scanf.Scan_failure "scanf: bad input at char number 27: ``looking for '@', found '\\n'''". I do not know it is a bug or not, but this difference causes trouble at ocaml setup.ml -build in OASIS. An interesting thing is that the following works fine: # Scanf.scanf "%S %S %s@\n" (fun x y z -> (x,y,z));; "hello" "world" bye - : string * string * string = ("hello", "world", "bye") | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0007404) ygrek (reporter) 2012-05-03 09:18 edited on: 2012-05-03 09:18 |
duplicate of 0005380 |
|
(0007405) furuse (reporter) 2012-05-03 09:36 |
By reading the comment in scanf.mli, I understand the current behaviour is correct wrt it. So, I think it is a bug of OASIS caused by a buggy implementation of the old scanf.ml. (** Scanning indications appear just after the string conversions [%s] and [%[ range ]] to delimit the end of the token. A scanning indication is introduced by a [\@] character, followed by some plain character [c]. It means that the string token should end just before the next matching [c] (which is skipped). If no [c] character is encountered, the string token spreads as much as possible. For instance, ["%s@\t"] reads a string up to the next tab character or to the end of input. If a [\@] character appears anywhere else in the format string, it is treated as a plain character. |
|
(0007406) doligez (manager) 2012-05-03 13:45 |
This is a known bug in oasis, and as far as I know, it was fixed a few months ago: https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=1067&group_id=54&atid=291 [^] |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-05-03 04:48 | furuse | New Issue | |
| 2012-05-03 09:18 | ygrek | Note Added: 0007404 | |
| 2012-05-03 09:18 | ygrek | Note Edited: 0007404 | View Revisions |
| 2012-05-03 09:23 | protz | Relationship added | duplicate of 0005380 |
| 2012-05-03 09:23 | protz | Status | new => resolved |
| 2012-05-03 09:23 | protz | Resolution | open => fixed |
| 2012-05-03 09:23 | protz | Assigned To | => protz |
| 2012-05-03 09:36 | furuse | Note Added: 0007405 | |
| 2012-05-03 13:45 | doligez | Note Added: 0007406 | |
| Copyright © 2000 - 2011 MantisBT Group |