Tyl Programming Language
▶ SYSTEM FUNCTIONS
Tyl has pre-built functions that can be used by the programmer in Tyl code.
Tyl system functions features:
We met the print system function in get started page. print function is used to print messages to the result box. print function has only one parameter, and that is object_to_print parameter.

Here's print function:
print object_to_print
object_to_print parameter is self explanatory but nonetheless can be detailed as:
object_to_print - The object to print, such as: string, number, list.
Any function has a return value. For regular functions it is the value of their last statement, but system functions has their own inherent return value. System function return value will be written in print function signature after the parameters, prepended by the arrow symbol: ''

Here's print function with return value:
print object_to_print → object_to_print
object_to_print return value, will be detailed as:
object_to_print - object_to_print parameter.
Note that if the return value is one of the function parameters, it will not be detailed, and the return value will be the value of the parameter after the function has finished to be executed.

Here's full len system function description:
len object → length
object - The object to measure the length of it.
length - For string, returns string length. For list, returns the number of items in the list.
There are cases when instead of returning a value, it is needed to modify one or more of the function parameters.

Say we want to get all the lines in a text:
string.lines text lineslines
lines parameter can be either an already declared list, or a new list that is constructed by string.lines function. When the system executes string.lines function, it fills the lines list with all the lines of text.
lines parameter is a modified parameter of string.lines function, and will be styled in bold italic characters, in the reference.


All system functions are in System Functions Reference