In tour.golang.org , exercice 36 , what this statement pic.Show(Pic)
supposed to do?
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
var p = make([]([]uint8), dy)
for i := 0; i < len(p); i++ {
p[i] = make([]uint8, dx)
for j := 0; j < len(p[i]); j++ {
p[i][j] = uint8((i + j) / 2)
}
}
return p
}
func main() {
pic.Show(Pic)
}
when I run the example, it just print some characters on the standard output, isn’t supposed to show some picture?