Here's the snippet I'm trying to run package main import ( "fmt" )
func main() { Af(5) } func Af ( N int) { //var M = new([N][N]uint16) !compiler error //var M = make([N][N]uint16) !compiler error //var M = make([][]uint16, N*N) ## run-time error // run-time error M := make( [][]uint16, N*N,N*N) for y:=0; y< N; y++ { for x :=0; x< N; x++ { M[y][x] = uint16(100*y +x) } } for y :=0; y< N; y++ { fmt.Printf("\n y= %3d", y ) for x :=0; x< N; x++ { fmt.Printf(" %3d ", M[x][y] ) } } fmt.Printf("\n>>>>>>>>>>" ) } -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.