© Tyl Software Foundation 2019-2021
▶ SYSTEM MODULES
Tyl system module handles tasks in a specific subject.
Tyl system module features:
- All system modules names and function names, are reserved, and cannot be used as a variable or function name
- A system module has functions, that are accessed by the format
module.function
- A system module function will not be activated if it does not have the right parameters
Say we want to read the contents of a file. We can use the
Here's
io
system module,
with the read
function, usually referred to as io.read
function.
Here's
io.read
function:
io.read path
io
module is responsible for file system actions. read
is a function in
io
module that is used for reading files. So, io.read
function gets the
path
, reads the file at path
if exists, and returns the contents of the file.
All system modules are in System Modules Reference
Tyl 2.2 introduces dynamic system modules that work in some ways as classes in other programming languages. These modules handle tasks such as database management, running processes and network TCP/IP communication.
A thorough guide on how to work with dynamic system modules is found in Dynamic System Modules page