login

4.4 Comparison

int PlTerm::operator ==(const PlTerm &t)
int PlTerm::operator !=(const PlTerm &t)
int PlTerm::operator <(const PlTerm &t)
int PlTerm::operator >(const PlTerm &t)
int PlTerm::operator <=(const PlTerm &t)
int PlTerm::operator >=(const PlTerm &t)
Compare the instance with t and return the result according to the Prolog defined standard order of terms.
int PlTerm::operator ==(long num)
int PlTerm::operator !=(long num)
int PlTerm::operator <(long num)
int PlTerm::operator >(long num)
int PlTerm::operator <=(long num)
int PlTerm::operator >=(long num)
Convert PlTerm to a long and perform standard C-comparison between the two long integers. If PlTerm cannot be converted a type_error is raised.
int PlTerm::operator ==(const char *)
Yields TRUE if the PlTerm is an atom or string representing the same text as the argument, FALSE if the conversion was successful, but the strings are not equal and an type_error exception if the conversion failed.

Below are some typical examples. See section 6 for direct manipulation of atoms in their internal representation.