Modules
// Module is an extension, which is a combination of between language and implementation.
Using module
To use a module, just with a use
keyword.
The above statement will load math module and math
identifier will be a local variable. By default, math module return a map that contains static functions and properties.
Alias
Using module with another name, or many module have special name, alias is a great way to deal with them.
Creating module
We have two ways to create a module:
1. By code
Create a new file named my-module.m.aup
And use it
Run with aup
If module not found, the compiler will stop and show error.
2. With C++
It is not strange at all, because aup is written in C++ 😄
// todo, we'll provide it soon
Last updated
Was this helpful?