Version: 1.3#120 (1999/11/26, 12:5:17 MET)
The CIAO system provides builtin predicates which allow dealing with names of constants (atoms or numbers). As an atom name must be of less than 512 characters, to handle sequences of more characters, strings (character code lists) must be used.
atomic_basic
)atomic_basic
)
name(Const,String)
String
is the list of the ASCII codes of the characters comprising the name of Const
. Note that if Const
is an atom whose name can be interpreted as a number (e.g. '96'), the predicate is not reversible, as that atom will not be constructed when Const
is uninstantiated. Thus it is recommended that new programs use the ISO-compliant predicates
atom_codes/2
or
number_codes/2
, as these predicates do not have this inconsistency.
The predicate is of type implicit.
Usage 1: name(+constant,?(string))
Usage 2: name(-(constant),+string)
String
can be interpreted as a number, Const
is unified with that number, otherwise with the atom whose name is String
.
atom_codes(Atom,String)
String
is the list of the ASCII codes of the characters comprising the name of Atom
.
The predicate is of type implicit.
Usage 1: atom_codes(+atm,?(string))
* ISO *
Usage 2: atom_codes(-(atm),+string)
* ISO *
number_codes(Number,String)
String
is the list of the ASCII codes of the characters comprising a representation of Number
.
The predicate is of type implicit.
Usage 1: number_codes(+num,?(string))
* ISO *
Usage 2: number_codes(-(num),+string)
* ISO *
number_codes(Number,String,Base)
String
is the list of the ASCII codes of the characters comprising a representation of Number
in base Base
.
Usage 1: number_codes(+num,?(string),+int)
Usage 2: number_codes(-(num),+string,+int)
atom_length(Atom,Length)
Length
is the number of characters forming the name of Atom
.
The predicate is of type implicit.
Usage: atom_length(+atm,?(int))
* ISO *
atom_concat(Atom_1,Atom_2,Atom_12)
Atom_12
is the result of concatenating Atom_1
followed by Atom_2
.
The predicate is of type implicit.
Usage 1: atom_concat(+atom,+atom,?(atom))
* ISO *
Usage 2: atom_concat(-(atom),-(atom),+atom)
* ISO *
Usage 3: atom_concat(-(atom),+atom,+atom)
* ISO *
Usage 4: atom_concat(+atom,-(atom),+atom)
* ISO *
sub_atom(Atom,Before,Length,Sub_atom)
Sub_atom
is formed with Length
consecutive characters of Atom
after the Before
character.
The predicate is of type implicit.
Usage: sub_atom(+atm,+integer,+integer,?(atm))
Go to the first, previous, next, last section, table of contents.