Next: 6.1 Predefined Functions Up: Reference Manual of the Previous: 5.6 References to Lua

6 Predefined Functions and Libraries

The set of predefined functions in Lua is small but powerful. Most of them provide features that allows some degree of reflexivity in the language. Some of these features cannot be simulated with the rest of the Language nor with the standard Lua API. Others are just helpful interfaces to common API functions.

The libraries, on the other hand, provide useful routines that are implemented directly through the standard API. Therefore, they are not necessary to the language, and are provided as separated C modules. Currently there are three standard libraries:

In order to have access to these libraries, the host program must call the functions strlib_open , mathlib_open , and iolib_open , declared in lualib.h .




Next: 6.1 Predefined Functions Up: Reference Manual of the Previous: 5.6 References to Lua