Files
the-way-to-go_ZH_CN/eBook/examples/chapter_7/multidim_array.go
2013-11-20 14:50:00 +08:00

17 lines
240 B
Go

package main
const (
WIDTH = 1920
HEIGHT = 1080
)
type pixel int
var screen [WIDTH][HEIGHT]pixel
func main() {
for y := 0; y < HEIGHT; y++ {
for x := 0; x < WIDTH; x++ {
screen[x][y] = 0
}
}
}