Gox Language (Gox语言)
《 Gox Language    is a free, open-source script language or a interpreter written by Golang. Golang is not required to be installed. Gox is only in one executable file, green and fast. And Gox provides a modern GUI programming ability(an embedded Gox code editor is also provided), and it's cross-platform, native, no dependencies and convenient.
《 Gox 语言    是基于Go语言(Golang)的一种免费开源脚本语言(解释型语言),使用Go语言编写,并可以调用几乎所有Go语言的标准库及很多优秀的第三方库,还可以根据需要自行扩展加入其他第三方库. Gox语言只需一个可执行文件即可运行,绿色高效,无需安装Go语言环境。Gox语言提供内置的图形界面编程能力,仅需一个动态链接库文件(可自动下载),提供内置的代码编辑器。Gox语言是跨平台的(支持Windows、Mac、Linux),同时提供标准版、命令行版(无图形界面)、服务器版(超迷你的WEB服务器、应用服务器、API服务器三合一),无依赖,易调试。

使用Gox语言自身编写的图形界面



Installation 安装方法
  • Download the latest Gox executable file or zip file. 下载最新的Gox语言可执行文件或压缩包。
  • Then put it into a directory in the system path. If you download the zip file, extract it first. 将其放在某个目录下,最好在系统路径之内,如果下载的是压缩包则将其解压。
  • Now it's ready to go. 即可使用。
  • If you would like to use Sciter for GUI programming, download the Sciter library file and place it in the same path with the Gox executable. Or follow the install instruction on the Go-Sciter site, only the first 2 steps are neccessary. Or only execute command "gox -initgui" in Windows platform, the newest Sciter dll file(s) will be downloaded to gox directory automatically.
  • Gox command-line only version (Goxc) is also provided here.
  • Further more, the document is here in Github or here in Gitee.
  • Gox语言的中文简介可以从这篇文章开始看起,或到这里看更多开发指南文章。

Usage

Check the version.

gox -version

Show help.

gox -h

Run a script file.

gox test.gox

And all the switches in Gox should be like "-type=code", not "-type code".

Start the interpreter in REPL mode.

> gox

the REPL runs like this,

> a=1                      
1                          
> b=2.3                    
2.3                        
> a+b                      
3.3                        
> printfln("a: %v", a)     
a: 1                       
                      
> exit()                   
exit status 1              
						

use "quit()" or "exit()" function to exit.