
atom_string(?Atom, ?String)

   Conversion between an atom and a string.



Arguments
   Atom                Atom or variable.
   String              String or variable.

Type
   Strings and Atoms

Description
   If Atom is instantiated, converts it to a string String.


   If String is instantiated, converts it to an atom Atom.




Modes and Determinism
   atom_string(+, -) is det
   atom_string(-, +) is det

Exceptions
     5 --- Atom is instantiated, but not to an atom.
     5 --- String is instantiated, but not to a string.
     4 --- Neither Atom nor String are instantiated (non-coroutine mode    only).

Examples
   
   Success:
   atom_string('Tom',"Tom").
   atom_string(tom,X).                 (gives X="tom").
   atom_string(X,"4").                 (gives X='4').
   Fail:
   atom_string('jo',"joe").
   Error:
   atom_string(X,Y).                   (Error 4).
   atom_string(4,"4").                 (Error 5).
   atom_string(tom,'tom').             (Error 5).





See Also
   append_strings / 3, integer_atom / 2, sprintf / 3, term_string / 2
