test function

153 views
Skip to first unread message

Ruben Safir

unread,
Dec 14, 2015, 8:56:27 AM12/14/15
to clip...@googlegroups.com
has the test function been removed?

[ruben@localhost clips]$ clips
CLIPS (Quicksilver Beta 5/31/08)
CLIPS> (test (and (integerp ?choice) (>= ?choice1)(<= ?choice 3) (< ?choice ?size)))

[EXPRNPSR3] Missing function declaration for test.
CLIPS>
--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013
Message has been deleted

CLIPS Support

unread,
Dec 14, 2015, 12:26:01 PM12/14/15
to CLIPSESG
Test is not a function. It's a conditional element used in a rule to indicate what follows is an expression to be evaluated, not a pattern to be matched against facts. You can enter functions and commands at the command prompt directly.

CLIPS> (test (assert (factoid)))



[EXPRNPSR3] Missing function declaration for test.

CLIPS
> (test (+ 3 4))



[EXPRNPSR3] Missing function declaration for test.

CLIPS
> (assert (factoid))
<Fact-1>
CLIPS
> (+ 3 4)
7
CLIPS
>
(defrule test-1
   
(test (> 4 3))
   
=>)
CLIPS
>
(defrule test-2
   
(> 4 3)
   
=>)
CLIPS
> (agenda)
0      test-1: *
For a total of 1 activation.
CLIPS
> (assert (> 4 3))
<Fact-2>
CLIPS
> (agenda)
0      test-2: f-2
0      test-1: *
For a total of 2 activations.
CLIPS
>
Reply all
Reply to author
Forward
0 new messages