{The S-lang C Library Reference}: SLang_autoload

Next Previous Contents

## 64. SLang_autoload

Synopsis

  Autoload a function from a file

Usage

  `int SLang_autoload(char *funct, char *filename)`

Description

  The `SLang_autoload` function may be used to associate a `slang` function name `funct` with the file `filename` such that if `funct` has not already been defined when needed, it will be loaded from `filename`.

  `SLang_autoload` has no effect if `funct` has already been defined. Otherwise it declares `funct` as a user-defined S-lang function. It returns `0` upon success, or `-1` upon error.

See Also

  `SLang_load_file, SLang_is_defined`

Next Previous Contents