aboutsummaryrefslogtreecommitdiff
path: root/content/constants/complex3.go
diff options
context:
space:
mode:
Diffstat (limited to 'content/constants/complex3.go')
-rw-r--r--content/constants/complex3.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/content/constants/complex3.go b/content/constants/complex3.go
new file mode 100644
index 0000000..95e9e41
--- /dev/null
+++ b/content/constants/complex3.go
@@ -0,0 +1,15 @@
+// +build OMIT
+
+package main
+
+import "fmt"
+
+func main() {
+ const Two = 2.0 + 0i
+ // START OMIT
+ var f float64
+ var g float64 = Two
+ f = Two
+ fmt.Println(f, "and", g)
+ // STOP OMIT
+}