next up previous

13.10.7 Previewing a Generic Function Call

This debugging function lists all applicable methods for a particular generic function call in order of decreasing precedence (see section 8.5.2). The function list-defmethods is different in that it lists all methods for a generic function.

Syntax

(preview-generic <generic-function-name> <expression>*)

This function does not actually execute any of the methods, but any side-effects of evaluating the generic function arguments and any query parameter restrictions (see section 8.4.3) in methods do occur. The output for the first example in section 8.5.2 would be as follows:

Example

CLIPS> (preview-generic + 4 5)
+ #7  (INTEGER <qry>) (INTEGER <qry>)
+ #8  (INTEGER <qry>) (NUMBER)
+ #3  (INTEGER) (INTEGER)
+ #4  (INTEGER) (NUMBER)
+ #6  (NUMBER) (INTEGER <qry>)
+ #2  (NUMBER) (INTEGER)
+ #SYS1  (NUMBER) (NUMBER) ($? NUMBER)
+ #5  (NUMBER) (NUMBER) ($? PRIMITIVE)
CLIPS>


next up previous