Official ZPE/YASS documentationLibraries
ZPE/YASS support libraries compiled by the ZPE compiler. They are 'imported' by the interpreter/runtime at runtime. In ZPE 1.7.5 (MacKay Lake) they are imported as a structure of the global function whilst version 1.7.4 and previous versions they were added as a global variable.
To reference a library that has been compiled first, it must first be installed to
There are two ways to do it: requesting the file from the ZULE repository or by just copying the file. The standard library is always available on ZULE and can be easily installed this way.
Referencing such libraries is easy. As of version 1.7.5 (MacKay Lake)
this is done by just using the
new keyword in
front of the name:
$lib = new stdLib() print($lib->gcd(54, 5))
Prior to version 1.7.5
Prior to version 1.7.5, libraries were accessed as variables that could not be
copied or made into instances. To use them one simply used the variable reference
in the same way as shown above, except instead of declaring the standard library
as an instance, the global
$stdLib variable is used: