mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:55:35 +08:00
添加06.2.md和相关的例子与问题解答
This commit is contained in:
15
eBook/examples/chapter_6/blank_identifier.go
Normal file
15
eBook/examples/chapter_6/blank_identifier.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var i1 int
|
||||
var f1 float32
|
||||
i1, _, f1 = ThreeValues()
|
||||
fmt.Printf("The int: %d, the float: %f \n", i1, f1)
|
||||
}
|
||||
|
||||
func ThreeValues() (int, int, float32) {
|
||||
return 5, 6, 7.5
|
||||
}
|
||||
|
Reference in New Issue
Block a user