diff options
author | haturatu <taro@eyes4you.org> | 2024-11-25 21:11:22 +0900 |
---|---|---|
committer | haturatu <taro@eyes4you.org> | 2024-11-25 21:11:22 +0900 |
commit | a770c6b1d3f030126361dc9fd1e06d98e950a573 (patch) | |
tree | db69a42d37f767704802fd6b209c359b1a3ff581 /main.go | |
parent | 221a1b62d76319c29e43154c978aa956cea3168c (diff) |
Hi
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -2,6 +2,20 @@ package main import "fmt" +var g *int + +func first() { + a := 1 + g = &a +} + +func second() { + b := 2 + _ = b +} func main() { + first() + second() + fmt.Print(*g, "\n") fmt.Print("Hello, Zed!\n") } |