Files
llgo/compiler/cl/_testpy/callpy/in.go

17 lines
326 B
Go
Raw Normal View History

2024-05-11 21:55:50 +08:00
package main
import (
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/py"
"github.com/goplus/llgo/py/math"
2024-05-11 23:38:21 +08:00
"github.com/goplus/llgo/py/os"
2024-07-04 18:39:31 +08:00
"github.com/goplus/llgo/py/std"
2024-05-11 21:55:50 +08:00
)
func main() {
x := math.Sqrt(py.Float(2))
2024-05-11 23:38:21 +08:00
wd := os.Getcwd()
2024-05-11 21:55:50 +08:00
c.Printf(c.Str("sqrt(2) = %f\n"), x.Float64())
2024-07-04 18:39:31 +08:00
std.Print(py.Str("cwd ="), wd)
2024-05-11 21:55:50 +08:00
}