publish constants and for

This commit is contained in:
Mark McGranaghan
2012-10-17 13:25:27 -07:00
parent 777c529caa
commit 1632105ca8
6 changed files with 36 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
// In Go, variables are explicitly declared and used by
// In Go, _variables_ are explicitly declared and used by
// the compiler to e.g. check type-correctness of function
// calls.
@@ -8,8 +8,7 @@ import "fmt"
func main() {
// `var` declares 1 or more variables. The type comes
// _after_ the name of the variable.
// `var` declares 1 or more variables.
var a string = "Initial"
fmt.Println(a)
@@ -22,7 +21,7 @@ func main() {
fmt.Println(d)
// Variables declared without a corresponding
// initialization are _zero-valued_. For example the
// initialization are _zero-valued_. For example, the
// zero value for an `int` is `0`.
var e int
fmt.Println(e)