type_name(expression)
1 package main 2 3 import ( 4 "fmt" 5 ) 6 7 func main() { 8 var a = 10 9 var b = 100 10 var res float32 11 //类型转换-类型(表达式) 12 res = float32(a) / float32(b) 13 fmt.Println(res) 14 }
posted on 2022-11-08 15:29 默玖 阅读(14) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 默玖 Powered by .NET 8.0 on Kubernetes