Copyright (C) 2000-2012 |
GNU Info (slib.info)RequireRequire ------- - Variable: *features* Is a list of symbols denoting features supported in this implementation. *FEATURES* can grow as modules are `require'd. *FEATURES* must be defined by all implementations (Note: Porting). Here are features which SLIB (`require.scm') adds to *FEATURES* when appropriate. * 'inexact * 'rational * 'real * 'complex * 'bignum For each item, `(provided? 'FEATURE)' will return `#t' if that feature is available, and `#f' if not. - Variable: *modules* Is a list of pathnames denoting files which have been loaded. - Variable: *catalog* Is an association list of features (symbols) and pathnames which will supply those features. The pathname can be either a string or a pair. If pathname is a pair then the first element should be a macro feature symbol, `source', or `compiled'. The cdr of the pathname should be either a string or a list. In the following functions if the argument FEATURE is not a symbol it is assumed to be a pathname. - Function: provided? feature Returns `#t' if FEATURE is a member of `*features*' or `*modules*' or if FEATURE is supported by a file already loaded and `#f' otherwise. - Procedure: require feature FEATURE is a symbol. If `(provided? FEATURE)' is true `require' returns. Otherwise, if `(assq FEATURE *catalog*)' is not `#f', the associated files will be loaded and `(provided? FEATURE)' will henceforth return `#t'. An unspecified value is returned. If FEATURE is not found in `*catalog*', then an error is signaled. - Procedure: require pathname PATHNAME is a string. If PATHNAME has not already been given as an argument to `require', PATHNAME is loaded. An unspecified value is returned. - Procedure: provide feature Assures that FEATURE is contained in `*features*' if FEATURE is a symbol and `*modules*' otherwise. - Function: require:feature->path feature Returns `#t' if FEATURE is a member of `*features*' or `*modules*' or if FEATURE is supported by a file already loaded. Returns a path if one was found in `*catalog*' under the feature name, and `#f' otherwise. The path can either be a string suitable as an argument to load or a pair as described above for *catalog*. automatically generated by info2www version 1.2.2.9 |