-
Notifications
You must be signed in to change notification settings - Fork 1
Basic module doc
Jean Dubois edited this page Nov 8, 2023
·
2 revisions
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
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.
- 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
pwdsh/bash/zsh/… command)