📖 English Documentation | 📖 中文文档
AviatorScript 是一门高性能、轻量级寄宿于 JVM 之上的脚本语言。
+-*/ 参与运算。使用场景包括:
<dependency> <groupId>com.googlecode.aviator</groupId> <artifactId>aviator</artifactId> <version>{version}</version> </dependency>
可以在 search.maven.org 查看可用的版本。
PATH 环境变量内),比如 ~/bin/aviator:$ wget https://raw.githubusercontent.com/killme2008/aviator/master/bin/aviator $ chmod u+x aviator
aviator 命令,将自动下载最新文档版本 aviator jar 到 ~/.aviatorscript 下的安装目录并运行:$ aviator Downloading AviatorScript now... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 153 100 153 0 0 111 0 0:00:01 0:00:01 --:--:-- 111 100 1373k 100 1373k 0 0 689k 0 0:00:01 0:00:01 --:--:-- 689k Usage: java com.googlecode.aviator.Main [file] [args] : java com.googlecode.aviator.Main -e [script] : java com.googlecode.aviator.Main -v
hello.av:p("Hello, AviatorScript!"); let a = tuple(1, 2, 3, 4, 5); p("sum of a is: " + reduce(a, +, 0)); let date = new java.util.Date(); p("The year is: "+ getYear(date)); p("The month is: "+ getMonth(date));
$ aviator hello.av Hello, AviatorScript! sum of a is: 15 The year is: 120 The month is: 3
更详细的请阅读用户指南。