Add Add en/0.2.3.md syntax highlighting

This commit is contained in:
vCaesar
2017-04-09 14:46:53 +08:00
parent e3aab44bff
commit 2a9a362c56
2 changed files with 177 additions and 170 deletions

View File

@@ -84,14 +84,15 @@ More examples.
In Go, we use `bool` to define a variable as boolean type, the value can only be `true` or `false`, and `false` will be the default value. ( ***You cannot convert variables' type between number and boolean!*** )
```Go
// sample code
var isActive bool // global variable
var enabled, disabled = true, false // omit type of variables
func test() {
var available bool // local variable
valid := false // brief statement of variable
available = true // assign value to variable
}
// sample code
var isActive bool // global variable
var enabled, disabled = true, false // omit type of variables
func test() {
var available bool // local variable
valid := false // brief statement of variable
available = true // assign value to variable
}
```
### Numerical types