globals
Functions in the base library, available without an import.
Values
| __argv | __argv | The command line the host was started with, as an array of strings. |
Functions
| array | array(size: int, [default_value]): array | Creates an array of size elements, each set to default_value. |
| assert | assert(condition, [message: function|string]) | Throws an error when condition is false. |
| callee | callee(): function | Returns the closure that is currently running. |
| compilestring | compilestring(source: string, [name: string, bindings: table|null]): function | Compiles source into a callable closure, without running it. |
| deduplicate_object | deduplicate_object(obj: table|array|null): table|array|null | Walks obj and merges equal tables and arrays it finds inside. |
| error | error(...) | Writes its arguments to the error stream. |
| errorln | errorln(...) | Writes its arguments to the error stream, followed by a newline. |
| freeze | freeze(obj): any | Returns a reference to obj with the immutable flag set. |
| getconsttable | getconsttable(): table | Returns the const table. |
| getobjflags | getobjflags(obj): int | Returns the engine flag bits stored on obj's reference. |
| getroottable | getroottable(): table | Returns the root table. |
| newthread | newthread(func: function): thread | Creates a thread (a coroutine) that runs func when resumed. |
| print | print(...) | Writes its arguments to the output stream. |
| println | println(...) | Writes its arguments to the output stream, followed by a newline. |
| suspend | suspend(...): any | Pauses the running thread and hands its arguments to whoever resumes it. |
| type | pure type(obj): string | Returns the name of obj's type. |