O'Reilly logo

Building Parsers with Java™ by Steven John Metsker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.5. Comparisons

A comparison compares the values of two terms, which can be variables, atoms, or arithmetic terms. The comparison operator is the functor of a comparison structure, and the comparison's terms are the terms of this structure. For example, a valid comparison can compare 9*11 to 100:

<(9*11, 100) 

You can issue a comparison as a query to the Logikus IDE. Regardless of the program that is present in the IDE, this comparison is true—99 is less than 100. If you enter this query and press Next, the results area displays yes. If you press Next again, the results area displays no. There is only one proof of the comparison, and thus there is no other way to prove its truth.

Logikus recognizes the following operators in comparisons:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required