Modules

Split a project across several .bao files and reuse them with importer … depuis …. A relative path starts with ./.

utils.bao
1
2
fonction doubler(x): retourner x * 2
main.bao
1
2
3
importer utils depuis "./utils.bao" afficher(utils.doubler(21))
42

After importing, you reach the module's functions through its name: utils.doubler(...). Each file stays short and reusable.

Relative imports (./file.bao) follow your project's tree in the Baobab Studio explorer.