github.com/goplus/llgo@v0.8.3/cl/_testrt/sum/in.go (about)

     1  package main
     2  
     3  import (
     4  	"github.com/goplus/llgo/internal/runtime/c"
     5  )
     6  
     7  func sum(args ...int) (ret int) {
     8  	for _, v := range args {
     9  		ret += v
    10  	}
    11  	return
    12  }
    13  
    14  func main() {
    15  	c.Printf(c.Str("Hello %d\n"), sum(1, 2, 3, 4))
    16  }