Quirrel4.41.0

globals

Functions in the base library, available without an import.

Values

__argv__argvThe command line the host was started with, as an array of strings.

Functions

arrayarray(size: int, [default_value]): arrayCreates an array of size elements, each set to default_value.
assertassert(condition, [message: function|string])Throws an error when condition is false.
calleecallee(): functionReturns the closure that is currently running.
compilestringcompilestring(source: string, [name: string, bindings: table|null]): functionCompiles source into a callable closure, without running it.
deduplicate_objectdeduplicate_object(obj: table|array|null): table|array|nullWalks obj and merges equal tables and arrays it finds inside.
errorerror(...)Writes its arguments to the error stream.
errorlnerrorln(...)Writes its arguments to the error stream, followed by a newline.
freezefreeze(obj): anyReturns a reference to obj with the immutable flag set.
getconsttablegetconsttable(): tableReturns the const table.
getobjflagsgetobjflags(obj): intReturns the engine flag bits stored on obj's reference.
getroottablegetroottable(): tableReturns the root table.
newthreadnewthread(func: function): threadCreates a thread (a coroutine) that runs func when resumed.
printprint(...)Writes its arguments to the output stream.
printlnprintln(...)Writes its arguments to the output stream, followed by a newline.
suspendsuspend(...): anyPauses the running thread and hands its arguments to whoever resumes it.
typepure type(obj): stringReturns the name of obj's type.