Skip to content

Modules & Imports

You can include other Tulpar files using the import keyword. This allows you to reuse code and organize your project.

// Import a file
import "examples/utils.tpr";
// Use functions from the imported file
int result = topla(10, 20);
print("Result:", result);

Imported files share the same global state. Variables defined in an imported file are accessible in the importing file.

Shared State