Section7
This commit is contained in:
26
Section6/67/main.go
Normal file
26
Section6/67/main.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
f "fmt"
|
||||
)
|
||||
|
||||
// import "fmt" //error reimporting same
|
||||
|
||||
const done = false //package scoped
|
||||
|
||||
func main() {
|
||||
var task = "Running" //local (block) scoped
|
||||
fmt.Println(task, done)
|
||||
|
||||
const done = true //local scoped
|
||||
f.Printf("done in main() is %v\n", done)
|
||||
f1()
|
||||
|
||||
f.Println("Bye!")
|
||||
}
|
||||
|
||||
func f1() {
|
||||
fmt.Printf("done in f1(): %v\n", done) //this isdone from package scope
|
||||
}
|
||||
Reference in New Issue
Block a user