Beowolf logo
 
 
Home    Features    How it works    Tour    Examples    FAQ    Purchase    
 
image
 

Flexpressions

One of the LISP Generator's most revolutionary features is its Flexpressions (flexible expressions) translator. It enables you to include math, conditional, and query expressions in your LISP program by writing them in just about any syntax-free form you want. The LISP Generator then translates the expression into AutoLISP code and inserts it in your program. Your expression may include variables and can be written in English, Algebra, C, Basic, LISP, or any combination of these languages. For example, you could type any of the following:

    y = 3 sin x / 5.0
    y = 3 * sin(x) / 5.0
    y is 3 times sin(x) over 5.0
    y equals three times the sine of x divided by five
and the LISP Generator would understand the expression, translate it, and write the following LISP code to your program:
    (setq y (/ (* 3 (sin x)) 5.0))
There could easily be a thousand different ways to write this expression and still have the LISP Generator translate it correctly into LISP.

The same is true for both conditional and query expressions. Here are a couple of examples:

    Continue to repeat the loop while...
    a = 7 * b and x < sqrt(y)
    a equals 7 times b and x is smaller than the square root of y

    Find all objects for which...
    the entity type is a circle and its color is red

Return to How It Works
   ©1989-2008