.script runs a script in languages such as JavaScript.


usage: .script [options] [path]
  -c,--charset <arg>   specifies the file character set

If the script file is not specified, the end of script is .end script on a line by itself.


-- test running a script from a file using a temporary script engine.
.script -t lib/print.js

-- test running a script using a non-temporary script engine
function println (str)
        display.println (interpreter, str);

println ("你好,世界");
.end script

-- re-use the script engine above to call the same println function created.
println ("你好,世界");
.end script


Jaqy uses Java Scripting API to create a ScriptEngine .

See Also