特牛网址导航

go语言标签和跳转_goto label jumps over declaration of-CSDN博客

网友收藏
文章浏览阅读419次。标签和跳转标签的语法是:Lable : gotogoto 语句用于函数的内部的跳转 var a int = 2LOOP: for a < 5 { if a == 3 { a = a + 1 goto LOOP } fmt.Printf("a= : %d\n", a) a++ }a= : 2a= : 4goto 语句不能跳过内 部变量声明语句 goto Lable1 a := 1Lable1: fmt.Println(a)goto L_goto label jumps over declaration of