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..

[Featurewish] Allow macro cross references between files
 
 

Hi,

I often have the problem that I have to use cross references between files:

e.g.
A.top

outputmacroa1()
   
b1()
outputmacroa2() 

B.top

outputmacrob1()
      
a2() 

There is no way I know of to compile them without splitting them, because regardless which file is listed first in the files text file, one macro is always not defined.

Is there a chance of either allowing macro declarations (telling the compiler that the macro will be defined later) or making the compiler scanning all macros first and and then compiling everything again?

 

 
  [ # 1 ]

Maybe.  But presently you can awkwardly manage any cycle because rules are functions (no arguments) and global variables are arguments. So you can use ^response(~mytopic.b1)  and put code in that topic at that rule.  Similarly, of course, you can embed the equivalent of rules in a function because you can use ^if(PATTERN ....) ...

 

 
  login or register to react