std-require-version


Synopsis

(std-require-version <module-name> <version-number>)

Description

Loads a module if it was not previously loaded or if the required version number is lower than the required number. It looks for a currently defined module and if it is not defined, it tries to load it from all paths from *MODULE-PATH* or the from the Acad library path.

Used to search for the required version number which is the value of the special symbol
*<module-name>-VERSION* such as *BINIO-VERSION* (currently: 2.1) for the module BINIO.

Returns the version number or nil.

Arguments

module-name: string or symbol. Usually the filename of the lisp file in which the module is defined. Just the name without absolute path or extension is needed. Usually case insensitive, but OS dependant. This name is passed to std-load if the module was not previously loaded.

On DOS 8.3 filesystems and if the modulename is longer than 8 characters the filename to search for is truncated.

version-number: a number, usually a real number.

Return Value

The version number of the loaded module or nil.

Side Effects

It may load a new module, which may create unpredictable side-effects, evaluating the contents of the lisp file.

Module

(std-require 'STDINIT)

Defined in STDMODUL