apropos

Gamma: Version 4.0
Prev |  | Next

# `apropos`

`apropos` -- finds all defined symbols in the current interpreter environment.

## Syntax

    apropos (pattern, predicate?)

## Arguments

`pattern`

  A character string which specifies a search pattern

`predicate`

  A function taking one argument which will return either nil or non-nil.

## Returns

A list of all symbols defined in the system which match the given `pattern`, and if the `predicate` is supplied, whose values are true under that predicate.

## Description

This function searches the names of all defined symbols in the currently running interpreter environment. The `pattern` can contain the following special characters:

- * matches any number of characters, including zero.

- [`c`] matches a single character which is a member of the set contained within the square brackets.

- [^`c`] matches any single character which is not a member of the set contained within the square brackets.

- ? matches a single character.

- {`xx`,`yy`} matches either of the simple strings contained within the braces.

- \`c` (a backslash followed by a character) - matches that character.

The `predicate` is any function which accepts a single argument. If the `predicate` evaluates to non-nil when given the value of a symbol, and if the symbol matches the pattern, then the symbol will be reported by apropos. If the `predicate` is not supplied, then all symbols which match the `pattern` will be reported. The `pattern` is case-sensitive.

## Example

        Gamma> apropos("s*", function_p);
        (setq strchr string symbol)
        Gamma> apropos("?[sli]{igc,er}*");
        (SIGCHLD SIGCONT dlerror)

Prev | Home | Next
Miscellaneous | Up | `create_state`, `enter_state`, `exit_state`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.