[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-03-29 (09:50) |
From: | Hendrik Tews <tews@t...> |
Subject: | scanf %n may return 1 too much? |
Dear all, is the following really the intented behaviour? # Scanf.sscanf " a" " %n" (fun n -> n);; - : int = 2 # Scanf.sscanf " a" " a%n" (fun n -> n);; - : int = 2 In the first one only one character is consumed, it should IMO return 1. The second one consumes one character more than the first one. So it should return one more than the first one. How can I scan _precisely_ one space without the look ahead behavior that the format " " apparently has? I guessed "% ", but that raises an exception. Bye, Hendrik