ZPE 1.13.5, released in April 2025 introduced modules to ZPE. These powerful constructs are pathing the way to more useful libraries for ZPE.
Libraries are static methods and values. They may contain immutable variables (once defined may not be modified), any number of functions and structures. They cannot contain tuples or records.
Accessing constants, functions and structures of a module is done using the scope resolution
operator (::), e.g.:
YASS
jamieb::whoami()
The code below demostrates defining modules and using the scope resolution operator.
YASS
function test() print("Hello") //This should not do anything as fullname is defined in the module print(fullname) jamieb::whoami() end function module jamieb fullname = "Jamie Balfour" //This function will load as main function, but it will not be a part of this module as main functions are run statically function main() //This is an ordinary function being called from the module test() //Although the fullname variable is defined in the module, the main function is called statically print(jamieb::fullname) jamieb::whoami() end function function whoami() print("My name is " & fullname) end function end module

There are no comments on this page.
Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days.
Comments powered by BalfComment