Go Mixed variable declaration

Go Mixed variable declaration

package main



import "fmt"



func main() {

   var a, b, c = 3, 4, "foo"  



   fmt.Println(a)

   fmt.Println(b)

   fmt.Println(c)

   fmt.Printf("a is of type %T\n", a)

   fmt.Printf("b is of type %T\n", b)

   fmt.Printf("c is of type %T\n", c)

}

This switched: http://codingdict.com/article/23565

Guess you like

Origin www.cnblogs.com/bczd/p/11975436.html