把别人的Tcl/Tk代码加入到Go语言里1 超椭圆

a 首先打开网页 http://wiki.tcl.tk/12977

b 把网页里提到的tcl/tk代码复制到go源代码的init_script字符串常量里

package main

import "github.com/nsf/gothic"

const init_script = `

#把Tcl/Tk源代码复制到这个常量里

`

func main() {

    ir := gothic.NewInterpreter(init_script)

    <-ir.Done

}

c 在LiteIDE里run ,运行效果如下

把别人的Tcl/Tk代码加入到Go语言里1 超椭圆

把别人的Tcl/Tk代码加入到Go语言里1 超椭圆



转载于:https://my.oschina.net/tsl/blog/408864