concatenates or splits atoms.
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.
Atom1 atom Atom2 atom Atom3 atom
| 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} |
This predicate is part of the ISO-Prolog Standard.
| scroll to top |
|