Go 作用域


Go 作用域

package main



import "fmt"



func main() {

   /* local variable declaration */

   var a, b, c int



   /* actual initialization */

   a = 10

   b = 20

   c = a + b



   fmt.Printf ("value of a = %d, b = %d and c = %d\n", a, b, c)

}