draw2d/postscript-go/cmd/test.go

16 lines
203 B
Go
Raw Normal View History

2010-12-13 14:54:47 +00:00
package main
import (
"fmt"
)
2010-12-13 14:54:47 +00:00
func main() {
toto := make([]int, 2, 2)
toto[0] = 1
toto[1] = 2
fmt.Printf("%v\n", toto)
2010-12-13 14:54:47 +00:00
toto = toto[0:0]
fmt.Printf("%v\n", toto)
fmt.Printf("%v\n", cap(toto))
2010-12-13 14:54:47 +00:00
}