Menu

#16 defrule allows variables like ?+ to be defined

CLIPS
closed
None
5
2024-07-19
2024-06-21
No

The following runs without issue:

(defrule foo (a ?+) =>)

this causes ppdefrule to return:

(ppdefrule foo)
(defrule MAIN::foo
   (a ? +)
   =>)

Note the space between the ? and + characters.

The following produces an error:

(defrule foo (a ?+) => (println "?+: " ?+))
[EXPRNPSR2] Expected a constant, variable, or expression.

ERROR:
(defrule MAIN::foo
   (a ? +)
   =>
   (println "?+: " ?

Discussion

  • Gary Riley

    Gary Riley - 2024-07-19
    • status: open --> closed
    • assigned_to: Gary Riley
     
  • Gary Riley

    Gary Riley - 2024-07-19

    Checked in a fix to the 64x and 70x versions.