18 go
我去编译:
0 known bugs; 0 unexpected bugs
并输入"hello world":
package main
import "fmt"
func main() {
fmt.Printf("Hello, ??\n")
}
Run Code Online (Sandbox Code Playgroud)
然后我试着编译它,但它不会去:
$ 8c gotest2 gotest2:1 not a function gotest2:1 syntax error, last name: main
这是在Pentium上的Ubuntu Linux上进行的.安装并通过测试.那我哪里出错了?谁能告诉我从哪里开始?
我也试过这个程序:
package main
import fmt "fmt" // Package implementing formatted I/O.
func main() {
fmt.Printf("Hello, world; or ???????? ?????; or ????? ??\n");
}
Run Code Online (Sandbox Code Playgroud)
但这也没有去(必须停止制作双关语):
$ 8c gotest3.go gotest3.go:1 not a function gotest3.go:1 syntax error, last name: main