Stdlib Version Functions


Synopsis

(stdlib-release-p) ; T or nil (stable or unstable release)

(stdlib-beta-p) ; nil or T (unstable or stable release)

Internal or external modules: (<module>-version)

(stdlib-version) ; => module version number

(random-version)

(primes-version)

(combinations-version)

External modules: (<module>-version)

(fileext-version)

(binio-version)

(registry-version)

(inifile-version)

(stdlocal-ads-version)

(stdlib-ads-version)

Always defined global variables:

*STDLIB-CDATE* ; Build Date in CDATE format

*STDLIB-DATE* ; Build Date in DATLST format

*STDLIB-VERSION*

Externally defined global variables:

*STDLIB-ADS-VERSION*, *STDLOCAL-ADS-VERSION*,
*<module>-VERSION*

Description

For every external module (and some internal ones) exists a function which returns the actual version number as real number. This version number is the same as the value of a special global symbol named like *<module>-VERSION*.

A number greater than 1.0 denotes a released module. There's currently no number system, which would clarify if a version number greater than 1.0 is considered stable or unstable. Thus you should either consult the sources or module documention or consider it as stable.

For the stlib main module only exist the two functions STDLIB-RELEASE-P and STDLIB-BETA-P (which are always mutual exclusive), to denote a released (stable) or intermediate (probably unstable, not formally tested, from the "latest" dir) release.

You may also directly check the magic symbol *<module>-VERSION*, because this is either nil or a number. The functions are provided to support good habits, i.e. functional style, but it is problematic to define lisp functions from external ADS modules. That's why we have to deal with global symbols.

*STDLIB-DATE* is defined besides *STDLIB-CDATE* to circumvent a possible VLISP bug (lost precision at load-time).

ADS Versions and Names

STDLIB-ADS and STDLOCAL-ADS support equally named internal modules, so they carry the ADS suffix for the modulename and version functions and variables, but their filenames are without the ADS suffix.

Other external modules with competing lisp modules manage their dependencies by themselves. There's only one module name and version function.

Normally all external ADS modules reside in one file only, named like "stdlib<version>.<extension>", where version has 2 characters, and can be something like: "12", "13", "14", "15", "ic" for Intellicad, "fc" for FelixCAD, "tc" for TurboCAD and so on.

The extension denotes the type of module. This is typically one of the following:

No extension for unix ADS modules, "exp" for DOS ADS, "exe" for WINDOWS ADS, "arx" for R13c4,R14,R15 ARX, "dll" for ADS modules of clones.

Exceptional Situations

If the module is not defined the version function will be undefined, thus throwing a "bad function" type of error. It is safer to check this with (std-module-defined-p '<module>) before.

Examples

;;; print a load message

(std-princ (list "\nSTDLIB v" (stdlib-version) ", "
             (std-cdate->date-string
               (std-datlst->cdate *STDLIB-DATE*))))

Return Value

The xxx-version functions return a real number.