mv _testcgo => _testrt
This commit is contained in:
16
cl/_testrt/sum/in.go
Normal file
16
cl/_testrt/sum/in.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/internal/runtime/c"
|
||||
)
|
||||
|
||||
func sum(args ...int) (ret int) {
|
||||
for _, v := range args {
|
||||
ret += v
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func main() {
|
||||
c.Printf(c.Str("Hello %d\n"), sum(1, 2, 3, 4))
|
||||
}
|
||||
Reference in New Issue
Block a user