Another question ... :~)

In CLIPS there is a feature which expands multifield variables into
single function parameters. The following example illustrates that best:

(bind ?m (create$ a b c))
(format t "1: %s 2: %s 3: %s\n" $?m)

i.e. by specifying the $ the multifield will be expanded.
Basically that equals (nth$ 1 ?m) (nth$ 2 ?m) (nth$ 3 ?m) in that case
but much simpler. Is there any way to do that in Jess?

Btw. I experimented with the (defadvice ) and tried this:
  (defadvice before format (bind $?argv (create$ t "1: %s 2: %s 3: %s\n"
$?m)))
  (format)
  (undefadvice format)

but that ignored for some reason the 't' (or nil or whatever I
specified) and complained:
  Message: Bad router 1: %s 2: %s 3: %s

Or
  (defadvice before format (bind $?argv (create$ $?argv)))
  (format t "1: %s 2: %s 3: %s\n" $?m)
  (undefadvice format)
results in
  Message: Not a string: "a b c" (type = LIST).

which is the same error as if I call the function as on the very top
(which is OK assuming that the multifield does not get expanded).

I also tried all variations I could think of but couldn't get it to
work. Any advice :~) ??

Thanks a lot,
        tge

-- 
     Thomas Gentsch



---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to