Modules
Modules
GLang includes basic module functionality using the fetch keyword.
To use the fetch keyword, provide the module name (file name)
fetch "path/to/my/file.glang";
bark(my_modules_function); # object defined in the other module
Upon importing, objects are only appended to the current scope.
func i() {
fetch std_math;
}
i();
bark(math_pi); # we cant access this, it's only inside of the 'i' function