package main
import "fmt"
func main() { a := 40
if a >= 35 { title := "sir" } else if a <= 35 { title := "dude" }
fmt.Printf(title)
}
# command-line-arguments
./main.go:14: undefined: title
func main() { a := 40
switch { case a >= 35: title := "sir" case a <= 35: title := "dude" }
fmt.Printf(title)
}--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.