Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[请教]有没有 printf? #13

Closed
hotmanga opened this issue Sep 14, 2022 · 6 comments
Closed

[请教]有没有 printf? #13

hotmanga opened this issue Sep 14, 2022 · 6 comments

Comments

@hotmanga
Copy link

老师你好, 我在 oschina 上看到 GScript 的介绍, 很喜欢这个语言, 再尝试使用, 我有使用到 println 这个函数. 但是我希望可以使用 printf 这样的函数, 不知道咱们 GScript 有没有? 我尝试检索项目查找, 但是没有找到定义. 求老师告知一下.

谢谢

另外, 我想看一下 gscript --help 说明, 结果看到了如下错误:

$> gscript --help
panic: read script fail, err:open --help: no such file or directory

goroutine 1 [running]:
main.main()
	/Users/chenjie/Documents/dev/github/compile/gscript/cmd/gscript.go:18 +0xb9

我是直接下载 executable 版本的, 这样的错误, 是不是老师您建议我下载源码自行编译?

@crossoverJie
Copy link
Owner

  1. 可以直接下载 v0.0.8 版,m1 的 mac 由于没有设备并没有打包,也可以自行本地安装。
    在项目目录执行 make build 即可。
  2. 所有的内置函数和内置类都在这个文件中:https://github.com/crossoverJie/gscript/blob/main/internal/internal.gs ,目前还不支持 printf,一些常用的函数还有缺失,后续会逐渐完善。
  3. 目前命令行工具比较简陋,可以使用 gscript xxx.gs 运行脚本,以及直接使用 gscript 启动 REPLREPL使用过程中的一些异常还不是很完善,所以可能得有点耐心,出问题了需要重新启动才会正常。
  4. 编译信息提示现在还没完善,所以有时候出现错误的时候不太容易找到异常代码,这点我正在准备完善了。

总之目前如果正常使用没什么问题,但异常流程排查起来会比较麻烦,使用过程中有任何问题可以加我微信 crossoverChen 交流,我会尽快解决,感谢支持。

@hotmanga
Copy link
Author

明白了, 感谢老师~~

@crossoverJie
Copy link
Owner

现已支持。

#15

@hotmanga
Copy link
Author

hotmanga commented Sep 17, 2022 via email

@crossoverJie
Copy link
Owner

还没有打 tag,要使用的话需要拉 main 分支的代码,本地编译。

@hotmanga
Copy link
Author

hotmanga commented Sep 17, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants