- 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 both Atom1 and Atom2 are atoms or Atom3 is an atom.
- atom_length(Atom,Length):
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 digits of the number Num.
- sub_atom(Atom,PreLen,Len,PostLen,Sub):
The atom Atom is divided into three parts, Pre, Sub, and Post with respective lengths of PreLen, Len, and PostLen.
- name(Const,CharList) (not in ISO):
The name of atom or number Const is the string CharList. (not in ISO).
- parse_atom(Atom,Term,Vars) (not in ISO):
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) (not in ISO):
Equivalent to parse_atom(Atom,Term,_)
- parse_string(String,Term,Vars) (not in ISO):
Similar to parse_atom but 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) (not in ISO):
Equivalent to parse_string(String,Term,_).
- term2atom(Term,Atom) (not in ISO):
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) (not in ISO):
Equivalent to:
term2atom(Term,Atom),atom_codes(Atom,String)
(not in ISO).
- write_string(String) (not in ISO):
Write the list of codes String as a readable string. For example, write_string([97,98,99]) outputs "abc". (not in ISO).