
concat_atoms(+Src1, +Src2, ?Dest)

   Succeeds if Dest is the concatenation of Src1 and Src2.
It is more efficient to use concat_strings/3 whenever possible.



Arguments
   +Src1               Atom.
   +Src2               Atom.
   ?Dest               Atom or variable.

Type
   Strings and Atoms

Description
   Dest is unified with the concatenation of Src1 and Src2.
   The use of this predicate is discouraged in favour of concat_strings/3,
   because the creation of new atoms involves entering them into a
   dictionary whose garbage collection is relatively expensive.




Resatisfiable
      No.

Fail Conditions
      Fails if Dest does not unify with the concatenation of Src1 and Src2.



Exceptions
     4 --- Either (or both) of Src1 and Src2 is not instantiated    (non-coroutine mode only).
     5 --- Either (or both) of Src1 and Src2 is instantiated, but not    to an atom.
     5 --- Dest is neither an atom nor a variable.

Examples
   
Success:
      concat_atoms(abc,def,abcdef).

      [eclipse]: [user].
       filename(File,Full) :-
            name(File,L),
            member(0'.,L) -> Full = File ;
                          concat_atoms(File,'.pl',Full).
       user compiled 208 bytes in 0.00 seconds
      yes.
      [eclipse]: filename(a,P), filename('b.pl',F).
      P = 'a.pl'
      F = 'b.pl'
      yes.

Fail:
      concat_atoms(ab,bc,abc).

Error:
      concat_atoms(art,X,artpaul).      (Error 4).
      concat_atoms(art,"paul",X).       (Error 5).





See Also
   concat_strings / 3, append_strings / 3, atom_string / 2
