IF Computer > MINERVA > Manual > Reference > Predicates > Atomic term processing > atom_concat/3

atom_concat/3

MINERVA
ifcomputer logo
f
Expert Services on the Web

concatenates or splits atoms.

atom_concat(+Atom1, +Atom2, -Atom3)
atom_concat(?Atom1, ?Atom2, +Atom3)

If Atom1 and Atom2 are atoms then Atom3 will be unified with the concatenation of Atom1 and Atom2.
If Atom3 is an atom then Minerva will split Atom3 in two parts (Part1 and Part2) and unify Atom1 with Part1 and Atom2 with Part2.

Arguments

Atom1                  atom
Atom2                  atom
Atom3                  atom

Examples

atom_concat('this is', ' an example', A3). Succeeds with substitution A3 <- 'this is an example'
atom_concat(A1, A2, 'abc'). Succeeds with substitutions
{A1 <- '', A2 <- 'abc'}
{A1 <- 'a', A2 <- 'bc'}
{A1 <- 'ab', A2 <- 'c'}
{A1 <- 'abc', A2 <- ''}
atom_concat(Basename, '.txt', 'hello.txt'). Succeeds with substitutions
{Basename <- hello}

Standard

This predicate is part of the ISO-Prolog Standard.

See also

atom_chars/2, atom_codes/2, atom_length/2, atom_number/2, char_code/2, number_chars/2, number_codes/2, parse_atom/2/3, sub_atom/5.

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/atomic_term/atom_concat/print_en.html
published 2008/7/7 update 1997/6/22 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 info@ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS