I stumbled on some remarkable behavior when using dotted variables. Here 's the story.
Dotted variables are a nice feature introduced in Jess 7.1. I have been using them, and I quite like them. However, it appears that I am not using them as intended, but they work nevertheless. Nice. The manual says that you can use them like ?x.y, where to refer to slot y of the fact in variable x. I use mostly shadow facts, which always have an OBJECT slot. It turns out that you can use dotted notation on the fact variable as well as on the OBJECT slot. E.g. if I have a facts which looks like (deftemplate x (slot OBJECT) (slot x1) (slot x2)) ; (slot OBJECT) because it actually is a shadow fact and somewhere in an LHS I have either ?x <- (x) or (x (OBJECT ?x)) then I can use the dotted notation ?x.x1 in both cases. I tend to use the seconds case a lot. (but only to inspect slots, never to modify them) Now it so happens that (slot x2) is also points to a shadow fact, with a slot y. So a thought that I would be convenient to use ?x.x2.y Given my experience hitherto, I was sort of surprised that I got a run-time error saying that the was no slot 'x2.y' in x. I guess I have incorrectly assumed that dotted notation could be used to arbitrary levels. Would this qualify as a bug, or am I just misusing an undocumented feature? Regards, -+- JW -+- -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users y...@address.com' in the BODY of a message to majord...@sandia.gov, NOT to the list (use your own address!) List problems? Notify owner-jess-us...@sandia.gov. --------------------------------------------------------------------