在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
对一段有关Go Code Block和变量作用域的代码的简要分析2018-05-11
https://mp.weixin.qq.com/s/vD8jOjkt_kBc9fd8huIUAQ
Each file has a file block containing all Go source text in that file. 4. Each "if", "for", and "switch" statement is considered to be in its own implicit block. 5. Each clause in a "switch" or "select" statement acts as an implicit block.
} type T struct { func writeDb1(Type int) (t T) { func main() { i := writeDb(1)
i1 := writeDb1(1)
fmt.Println(i,j,i1,j1)
|
请发表评论