1、bool类型
示例1:
package main import "fmt" func main() { var a bool a = true fmt.Println("a = ", a) }
#执行结果
a = true
示例2:
package main import "fmt" func main() { var b = false fmt.Println("b = ", b) }
#执行结果
b = false
示例3
package main import "fmt" func main() { c := false fmt.Println("c = ", c) }
#执行结果
c = false
原文地址:https://www.cnblogs.com/nulige/p/10199830.html
时间: 2024-10-17 11:04:37