IF Computer > MINERVA > Manual > Reference > Predicates > Atomic term processing > atom_chars/2

atom_chars/2

MINERVA
ifcomputer logo
f
Expert Services on the Web

defines a relation between an atom and a list of one-character atoms.

atom_chars(-Atom, +List)
atom_chars(+Atom, ?List)

If Atom is an atom then atom_chars/2 explodes Atom into a list of one-character atoms.
If Atom is a variable then List must be a list of one-character atoms. atom_chars/2 concatenates the characters of the list to the atom Atom.

Arguments

Atom                  atom
List                  list of characters (atoms with length=1)

Examples

atom_chars(abcde, L). Succeeds with substitution L <- [a,b,c,d,e].
atom_chars(A, [l,i,s,t]). Succeeds with substitution A <- list.
atom_chars(list, [l,I,s,T]). Succeeds with substitution I <- i, T<- t.

Standard

This predicate is part of the ISO-Prolog Standard.

See also

atom_codes/2, atom_concat/3, 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_chars/print_en.html
published 2008/6/30 update 1998/8/11 (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