EMA-XPS Online


[AND

[AND
====

Syntax: (ask [and {<predication> ...}] <continu.>)

WARNING: [AND should be used only WITHIN an ASK!

This function is a compound predication. It tries
to evaluate each predication in sequential order.
If the evaluation of a predication is successful,
i.e. a non empty set of bindings of BQL-variables
remains, the next predication will be evaluated.
When a predication fails, further evaluation is
omitted and ASK returns immediately.

LISP expressions can be used within [AND, too. They
have to comply with the same conditions. A return-
value of NIL is interpreted a failure, all non-NIL
values express success.

Only when this function evaluates successfully, the
'continuation' is executed, otherwise it won't.

The function will be used, when the range of validity
of a BQL variable has to be specified, or when the
continuation of an ASK only will be executed in
classic sense of the function AND, when the predica-
tions of the function [AND were evaluated successful.

The function [AND does not provide a useful
return value.

Example: >(ask
           [and
            [options _a-computer _an-option]]
           (kb-format "~% the computer ~A
             has the following options: ~% ~A"
            (name-of _a-computer)
            (name-of _an-option)))
          the computer SIEMENS-NIXDORF has the
            following options:
          1GB-HARDDISK
          the computer SIEMENS-NIXDORF has the
            following options:
          16MB-RAM
          the computer WANG has the following
            options:
          850MB-HARDDISK
          the computer WANG has the following
            options:
          QUAD-SPEED-CDROM
         NIL


EMA-XPS Online