loadFile() reads and executes a script file fileName from a local file systems. It returns the result of last expression.
loadFile("..\\examples\\misc\\compose.pnut")
loadFile(`..\examples\misc\compose.pnut`)
loadFile("../examples/misc/compose.pnut")
loadFile("/home/pnuts/sample.pnut")
load() reads and evaluates a script and returns the result of the last expression. If Context.getClassLoader() returns a class loader, the load() function finds a script using the class loader. Otherwise, the system class loader is used to find a script.
require() reads a script file if the file has not been read.
The suffix '.pnut' can be omitted for load() and require().
When the suffix '.pnut' is omitted in these calls, Pnuts interpreter first tries to load a corresponding class as a precompiled script and then load .pnut file. See "Implementing Loadable Class in Java" for details.
autoload() associates name with a scriptName so that when the variable name is not defined, the scriptName is loaded before the reference is resolved.
The suffix '.pnut' can be omitted for autoload().
autoload("ls", "pnuts/util/ls")