Skip to content

Basic module doc

Jean Dubois edited this page Nov 8, 2023 · 2 revisions

Basic Module Documentation

A module (type module) is a file containing Nougaro functions, statements and constants. It is used to save time in your code. Module can do various things that, often, are undoable in Nougaro.

There are two types of modules: built-in and defined by the user. Both can be imported using this syntax: import name. If you want the module to be accessible with another name, use: import name as alias.

You can write modules or see the list of existing ones

Import other files from your project

You can import files from the current directory or subdirectories using the same syntax.

Use import folder.subfolder.file to open (cwd)/folder/subfolder/file.noug.

Note that you can use the as keyword as usual.

How is the current directory (cwd) determined?

  • If you execute a file: it is the parent directory of your file
  • If you execute the shell: it is the current working directory (you can get it with the pwd sh/bash/zsh/… command)

Clone this wiki locally