3. Jess Language Basics 13 Note that you can nest function calls; the outer function is responsible for evaluating the inner function calls. Jess comes with a large number of built-in functions that do everything from math, program control and string manipulations, to giving you access to Java APIs. You can also define your own functions either in the Jess language or in Java. One of the most commonly used functions is printout , which is used to send text to Jess's standard output, or to a file. A complete explanation will have to wait, but for now, all you need to know is contained in the following example: Jess> (printout t "The answer is " 42 "!" crlf) The answer is 42! Another useful function is batch , which evaluates a file of Jess code. To run the Jess source file examples/jess/hello.clp you can enter Jess> (batch "examples/jess/hello.clp") Hello, world! Each of these functions (along with all the others) is described more thoroughly in the Jess function guide. 3.7. Variables
This is the end of the preview. Sign up
access the rest of the document.
This note was uploaded on 03/02/2010 for the course COMP 102 taught by Professor Smith during the Spring '10 term at California State University , Monterey Bay.