Alexander Burger wrote:
Hi Cle,
Hi Alex,
(...)
Yes, the work-around is easy: Just use variables '@1', '@2' instead of
'@'. It is just rather inelegant, and may produce unwanted output :-(
jupp, so I will have a look at this, if this problem will bite me one
day :-)
The next problem seems rather hairy:
(? (@CL list 'foo '(@N)) (equal (@P . (@A)) @CL) (call @P . @A) (@
retract (-> @CL))
...
(be retract (@CL)
(equal (@P . (@A)) @CL)
(call @P . @A)
(@ retract (-> @CL)) )
It works if you use
... (equal (@P (@A)) @CL) (call @P @A) ...
and
...
(equal (@P (@A)) @CL)
(call @P @A)
...
Ahhhh ... Ehhhh ... :-O
But my interactive line (? (...)) *did* work correctly as I wrote it.
Only if I try to bring it into another clause by defining 'retract' it
will not work :-/
And I tried your example as follow:
(? (assertz (foo (1 1)))
(? (assertz (foo (2 2)))
(? (assertz (foo (3 3)))
(be retract (@CL)
(equal (@P (@A)) @CL)
(call @P @A)
(@ retract (-> @CL)) )
it will *not* work with
(? (retract (foo (@N @C))))
nor
(? (retract (foo @N @C)))
I would like, to implement the first syntax above, as that match with
the 'assertz' predicate.
But don't ask me why! 'call' seems rather tricky, and I don't remember
how and why I implemented it in that way (about 15 years ago) :-(
Urghs ... then if you do not know, how I can get my 'retract' to work
properly, I will have to look much more deeply into 'call' to understand
it ... but the hope dies last ;-)
(...)
Ciao,
Cle.
--
UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe