[alicebot-archcomm] Re: [alicebot-archcomm] tag, and clearing predicates
Kim Sullivan
alicebot-archcomm@list.alicebot.org
Tue, 10 Dec 2002 09:40:19 +0100 (CET)
> So, the above AIML can become
> <set name="some-predicate"/>, which, as defined in the AIML spec, is the
> shortcut element for <set name="some-predicate"><star/></set>, which is not
> what one wanted.
I believe this is not the case. One would think that this behavior applies
generally to all elements (we've had a discussion about this with Pedro or
Sherman in the early days of arch, I made the same assumption) but in
fact, the spec only mentions <person/> <person2/> and <gender/> as valid
shortcuts of this type. (In case I missed something please point me to the
paragraph but I'm pretty sure I didn't).
> I believe Kim's ProgramP has a <forget/> tag to achieve the effect of
> clearing all variables.
You can, however, use <set name="variable"/> too.
Generally I don't think it's that much necessary to differentiate between
"empty" and "non-existent" variables, especially in languages where you
don't need to declare a variable before using it, and all variables are
dynamically typed (or no types exist).
What does bother me is the fact that you can't test for an empty value,
and a single wildcard usually matches an empty string (going against the
"one or more words" definition).
Kim
______________________________________________________________________
Reklama:
Pouze do 20.12.2002 získáte prémii 400,- Kc pri uzavrení
smlouvy o stavebním sporení na http://prodej.finance.cz