[snip]
> original factbase, using fact-index and fact-relation, but still miss
> a way to say: **match all not (child $?) facts**.
But there is I think.
To enumerate all facts that do NOT start with (child ...) Why not use
something like:
(do-for-all-facts ((?x (delete-member$ (get-deftemplate-list) child)))
TRUE (ppfact ?x) ; or some other function instead of ppfact for
example
Or:
(bind ?list (find-all-facts ((?x (delete-member$ (get-deftemplate-
list) child))) TRUE)) to just get them in a multifield ?list.
The "ordered facts" are returned in the get-deftemplate-list as well,
so it isn't only for deftemplates.
The slot value for an ordered fact is "implied", so if you only wanted
to see
which members were "ordered facts" you could. The list would need to
be filtered by (deftemplate-slot-existp <member> implied)
with something like:
(deffunction ordered-fact-deftemplates ()
(bind ?ordered (create$))
(progn$ (?name (get-deftemplate-list))
(if (deftemplate-slot-existp ?name implied) then (bind ?ordered
(insert$ ?ordered 999999 ?name))))
?ordered)
Which could be used in place of (get-deftemplate-list) in my previous
do-for-all-facts call to get ONLY ordered facts that aren't "child"
ones.
Cheers,
jsfb