© Tyl Software Foundation 2019-2021
▶ SYSTEM FUNCTIONS
Tyl has prebuilt functions that have a fixed functionality.
Tyl system functions features:
- All system function names are reserved, and cannot be used as a variable or function name
- A system function is used as a regular function
- A system function will not be activated if it does not have the right parameters
Throughout this guide all system functions in code boxes are in dark blue color.
We met the
We met the
objectparameter is self explanatory but nonetheless can be detailed as:
The object to print, such as string, number, list or record.
Any function has a return value. For regular functions, it is the value of their last executed statement, but system functions has their own inherent return value. System function return value will be written in the function description after the parameters, prepended by the arrow symbol '
print object → object
objectreturn value, will be detailed as:
Note that if the return value is one of the function parameters, it may not be detailed, and the return value will be the value of the parameter after the function has finished to be executed.
lensystem function description:
len var → length
for string, returns string length, for list - the number of items in the list, and for record - the number of keys in the record mapping data.
Some system function parameters are optional, meaning, the function do not require them. For ex., the
beepsystem function has two parameters, but optionally can be called without parameters. Another example is
string.sectionfunction in string module that its
lengthparameter can be omitted. So if a parmeter has default value or the description specifies that it can be omitted, than this is an optional parameter.
All system functions are in System Functions Reference