- atom_chars(Atom,Chars):
Chars is the list of characters of Atom.
- atom_codes(Atom,Codes):
Codes is the list of numeric codes of the characters of Atom.
- atom_concat(Atom1,Atom2,Atom3):
The concatenation of Atom1 and Atom2 is equal to Atom3. Either Atom1 and Atom2 are atoms, or Atom3 is an atom.
- atom_length(Atom,Length):
The length, in characters, of Atom is Length.
- char_code(Char,Code):
The numeric code of the character Char is Code.
- number_chars(Num,Chars):
Chars is the list of digits (including '.') of the number Num.
- number_codes(Num,Codes):
Codes is the list of numeric codes of the digits of the number Num.
- sub_atom(Atom,PreLen,Len,PostLen,Sub):
The atom Atom is divided into three parts, Pre, Sub, and Post. The three parts have the lengths PreLen, Len, and PostLen, respectively.
- name(Const,CharList):
The name of the atom or the number Const is the string CharList. (not in ISO).
- parse_atom(Atom,Term,Vars):
Convert Atom to Term, where Vars is a list of elements in the form (VarName=Var). It fails if Atom is not syntactically correct. Examples:
| ?- parse_atom('X is 1+1',Term,Vars)
Vars = [X=_8c019c]
Term = _8c019c is 1+1?
| ?- parse_atom('p(X,Y),q(Y,Z)',Term,Vars)
Vars = [Z=_8c01d8,Y=_8c01d4,X=_8c01d0]
Term = p(_8c01d0,_8c01d4),q(_8c01d4,_8c01d8)?
| ?- parse_atom(' a b c',Term,Vars)
*** syntax error ***
a <<here>> b c
no
(not in ISO).
- parse_atom(Atom,Term): This is equivalent to parse_atom(Atom,Term,_). (not in ISO).
- parse_string(String,Term,Vars): This is similar to parse_atom, except that the first argument is a list of codes. Example:
| ?- name('X is 1+1',String),parse_string(String,Term,Vars)
Vars = [X=_8c0294]
Term = _8c0294 is 1+1
String = [88,32,105,115,32,49,43,49]?
(not in ISO).
- parse_string(String,Term): This is equivalent to parse_string(String,Term,_). (not in ISO).
- term2atom(Term,Atom):
Atom is an atom that encodes Term. Example:
| ?- term2atom(f(X,Y,X),S),writeq(S),nl.
'f(_9250158,_9250188,_9250158)'
S=f(_9250158,_9250188,_9250158)
(not in ISO).
- term2string(Term,String):
This is equivalent to:
term2atom(Term,Atom),atom_codes(Atom,String)
(not in ISO).
- write_string(String):
Write the list of codes, String, as a readable string. For example, write_string([97,98,99]) outputs "abc". (not in ISO).