-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from tsingbx/boolean
add doc for boolean
- Loading branch information
Showing
3 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// The bool type represents Boolean variables. Variables of bool type can have | ||
// one of two values: true or false. The zero value for a bool is false. | ||
|
||
var flag bool // no value assigned, set to false | ||
var isAwesome = true | ||
|
||
println(flag, isAwesome) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// In go+, you can cast bool to number types. | ||
|
||
println int(true) // 1 | ||
println float64(true) // 1 | ||
println complex64(true) // (1+0i) |
This file was deleted.
Oops, something went wrong.