If you want to load a module in LISP you can use require
or load
.
The difference between them is that the require
is specific to load modules written in LISP. Already the load
can be used with any file type.
The require function tests whether a module is already present, using a case-by-case comparison, if the module is not present, it prompts you to upload the appropriate file or set of files. The path name argument, if present, is a single path name or a list of path names whose files should be loaded in order, from left to right. If the path name argument is null or is not provided, the system will attempt to determine, in some way dependent on the system, which files to load. This will usually involve some central record of module names and associated file lists.
Syntax:
(require nome-do-módulo [caminho])
- module name is the name of the module to be loaded.
- [way] is an optional that informs the file path.
The load function loads the named file into the Lisp environment. It is assumed that a text(character file) can be automatically distinguished from an object(binary) file by some appropriate implementation dependent means, possibly by the file type. The defaults for the file name are obtained from the default variable-pathname-defaults. If the file name (after merging the patterns) does not explicitly specify a type, and the text and object types of the file are available in the file system, the upload should try to select the most appropriate file by some means dependent on the implementation. .
Syntax:
(load filespec [verboso] [print] [if-does-not-exist] [external-format])
- filespec is a stream or path to the archive.
- [verbose] optional logical value indicated if the file will be loaded
in verbose mode. True for verbose mode and false for silent.
- [print] optional logical value indicated if the contents of the file will be
echoed from standard output(stdio). True to echo and false to not
echo.
- [if-does-not-exist] optional logical value indicated if the
file must generate an assertion if it does not exist. True to generate
assertion and False not to generate assertion.
- [External-format--an External] format assigned to the file. Also
optional.
For more information on require and load.
That’s exactly what I wanted, thank you very much!!
– Pedro Augusto Null