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

atom_length/2

MINERVA
ifcomputer logo
f
Expert Services on the Web

unifies the number of the characters of an atom.

atom_length(+Atom, -Number)

atom_length/2 unifies Number with the number of characters of Atom.

Arguments

Atom                   atom
Number                 integer >= 0

Examples

atom_length('this is quite a long text', N). Succeeds with substitution N <- 25
atom_length('four', 4). Succeeds.
atom_length('five', 5). Fails.

Standard

This predicate is part of the ISO-Prolog Standard.

See also

atom_chars/2, atom_codes/2, atom_concat/3, atom_length/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_length/print_de.html
published 2008/11/17 update 1998/8/11 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS