1
multifield 변수가있는 슬롯에 허용 된 정수를 제한하고 싶습니다.변수가있는 슬롯에 허용 된 정수를 설정할 수 있습니까?
그래서 대신 :
CLIPS> (bind ?multifieldvariable (create$ 1 3 4 7))
(1 3 4 7)
CLIPS> (deftemplate bar (slot constr-integers (allowed-integers ?multifieldvariable)))
[PRNTUTIL2] Syntax Error: Check appropriate syntax for allowed-integers attribute.
ERROR:
(deftemplate MAIN::bar
(slot constr-integers (allowed-integers ?multifieldvariable
내가이 문제를 해결하는 방법을 알고 있지만, 어쩌면 그것을 할 수있는 방법이있다 :
CLIPS> (deftemplate foo (slot constr-integers (allowed-integers 1 3 4 7)))
이 같은 일을 할 원 더 우아한 방법.
안부, 세바스찬
동적으로 빌드 함수 호출로 deftemplate 작성하여 그것을 할 수만 있습니다