We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6eaf468 commit 3bb2bf8Copy full SHA for 3bb2bf8
107-Integers/integers.gop
@@ -10,11 +10,16 @@
10
// For int 20 values can also be expressed in hex (0x14), octal (0o24), and binary notation (0b0010100).
11
// uint, there are no uint literals. All literal whole numbers are treated as int values.
12
//
13
-// Go+ also supports writing numbers with _ as separator:
+// Go+ also supports writing numbers with _ as separator and also support cast bool to number types.
14
+// As example shows
15
16
num := 1_000_000 //Go+ support, same as 1000000
17
println num
18
19
+println int(true) //Go+ support cast bool to int
20
+println float64(true) //and to float64
21
+println complex64(true) //and to complex64, and so on.
22
+
23
println 20+20
24
println 20+30
25
println 0x14 //in hex
0 commit comments