AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

burst in a macro
 
 

I am having problems with the following code:

outputmacro: ^testBurst ()
 @
10 = ^burst(^"a b c")
 
done


u
: (burst)
 
Direct output: ^testBurst()\n
 
 
$$tmp = ^testBurst()
 
Assigned to variable: $$tmp\n
 
^nofail(RULE ^writefact($$tmp)) 

which generates the output:

Direct outputdone
Assigned to variable
216,994
^burst ^burst 0x110 


When the macro is used in output directly then I see what I expected. But when the results of the macro is assigned to a variable then instead of seeing the text output I unexpectedly get the fact id of the last fact in the bursted factset.

This only happens if the results of the ^burst are assigned to a factset. Assigning to a match variable or $ variable doesn’t impact the output from the macro. Whereas assigning to a factset ignores/destroys any output before or after the ^burst command. It also doesn’t matter if I nest outputmacros so that the actual ^burst is several layers deep.

This is obviously a simple test case and my real situation involves a bit more processing, but it is causing me immense grief as I cannot find a good workaround. Assigning to match variables would be tricky because some would be in use and the input could be of variable length so might hit a limit.

 

 

 
  [ # 1 ]

I will release a new version this weekend.  It has already fixed your bug.

 

 
  login or register to react