FAQ
Works fine on tip:

$ go run /tmp/scanf.go
1,4
input==> 1 , 4
5,6
input==> 5 , 6
3,5
input==> 3 , 5


On Wed, Mar 27, 2013 at 9:01 AM, wrote:
It is 'go version go1.0.3' on WindowXP and GoClipseV0.7.6
e.g.
```go
func main() {
for i := 0; i < 3; i++ {
var n,m int
var _, ok = fmt.Scanf("%d,%d", &n, &m)
if ok != nil {
fmt.Println(ok)
}
fmt.Println("input==>",n,",",m);
}
}
```go
The follow is on the console:
1,2
input==> 1 , 2
unexpected newline
input==> 0 , 0
2,3
input==> 2 , 3

please, can you tell me why i got 'unexpected newline'?

--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 5 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 27, '13 at 5:41a
activeMar 27, '13 at 1:09p
posts5
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase