Skip to content

Commit 6741464

Browse files
committed
Merge pull request astaxie#254 from dlintw/patch-3
describe more about const
2 parents 5251c0d + a9802a3 commit 6741464

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ebook/02.2.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ Go对于已声明但未使用的变量会在编译阶段报错,比如下面的
7878
const MaxThread = 10
7979
const prefix = "astaxie_"
8080

81+
Go 常量和一般程式語言不同的是,可以指定相當多的小數位數(例如200位),
82+
若指定給float32自動縮短為32bit,指定給float64自動縮短為64bit,詳情參考[連結](http://golang.org/ref/spec#Constants)
8183

8284
## 内置基础类型
8385

0 commit comments

Comments
 (0)