BS Modules

Learn how to organize and share code with modules in BornomalaScript.

Modules

Modules help you organize code into separate files so your project stays easier to manage.

Instead of keeping everything in one file, you can split related logic into smaller parts and bring them together when needed.

Why Modules Matter

Modules are useful because they let you:

  • keep files smaller
  • reuse code across a project
  • separate responsibilities
  • make large programs easier to maintain

What You Will Learn

In this section, you will learn how to:

  • export values from one file
  • import values into another file
  • keep related code organized

How Modules Help

When a project grows, modules make it easier to find the code you need.

For example, one file might hold utility functions, another might hold constants, and another might hold your main program logic.

Learning Path

Start with the import and export lesson, then use modules to organize larger projects.

Quick Preview

  • Modules split code into files
  • Imports bring code into a file
  • Exports make code available to other files

Next Step

Open Import & Export to see how BornomalaScript shares values across files.