Lynxer

Documentation

importAs

importAs("module", "alias") loads a module exactly like import, but binds it under a name you choose instead of the module's own name.

Syntax

global setup(){
    importAs("math", "m");
    importAs("network", "net");
    importAs("json.so", "nativeJson");   // a native library under an alias
}

global main(){
    println(global.m.sqrt(9.0));         // 3
}

Rules

See also