[ Type Testing | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

# current_atom(?Atom)

Succeeds if Atom is an atom in the system.

Atom
  Atom or variable.

## Description

Used to return all currently defined atoms.

Note that once an atom name is specified for the first time it is automatically made known to the system, so calls to current_atom/1 with any atom as an argument will always succeed.

### Modes and Determinism

- current_atom(+) is det
- current_atom(-) is multi

### Exceptions

(5) type error
  Atom is not instantiated to an atom.

## Examples

    Success:
       current_atom(eclipse).
       current_atom(anything).
       current_atom('My atom').

       [eclipse]: current_atom(X).

       X = []    More? (;)         % RETURN pressed
       yes.
       [eclipse]:

    Error:
       current_atom(1).           Error 5.
       current_atom(man(1)).      Error 5.

## See Also

atom / 1, current_functor / 1