Daniellyu / go-tour

Automatically exported from code.google.com/p/go-tour
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Page 15, needInt(Big) is outdated #167

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Go to tour.golang.org/#15
2. Implement the suggestion to print needInt(Big)
3. Run

What is the expected output? What do you see instead?
Expected: Big should be printed in it's expected Int context.
Reality: constant 1267650600228229401496703205376 overflows int

What version of the product are you using? On what operating system?
go version go1.1.2 linux/amd64

Original issue reported on code.google.com by chhatoip...@gmail.com on 16 Oct 2013 at 1:00

GoogleCodeExporter commented 8 years ago
The purpose of this slide is to demonstrate that you can have a numeric 
constant larger than would fit in an actual integer.

Original comment by a...@golang.org on 17 Oct 2013 at 1:53