From b315bfc553f74610d58147d01780a85db21f59bc Mon Sep 17 00:00:00 2001 From: sebastian Date: Wed, 27 Sep 2023 20:34:57 +0200 Subject: [PATCH] sync --- Section4/iota/main.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Section4/iota/main.go diff --git a/Section4/iota/main.go b/Section4/iota/main.go new file mode 100644 index 0000000..eab9134 --- /dev/null +++ b/Section4/iota/main.go @@ -0,0 +1,27 @@ +package main + +import "fmt" + +func main() { + const ( + c1 = iota + c2 = iota + c3 = iota + ) + fmt.Println(c1, c2, c3) + + const ( + a = (iota * 2) + 1 + b + c + ) + fmt.Println(a, b, c) + + const ( + x = -(iota + 2) + _ + y + z + ) + fmt.Println(x, y, z) +}