AI Zone Admin Forum Add your forum

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

local variables for each macro

Hi, local variables aren’t completely local right know.
Would it be possible to make them only valid for the current macro?

I ran into some problems until I realized that this:

outputmacro: ^f1()

test is $$_test

: ^f2() 
$_test CHANGED 

leads to

Test executing test is CHANGED



  [ # 1 ]

$_ variables are completely local


  [ # 2 ]

So my tests works for you?
If they are local to the macro the $$_test of ^f2 shouldn’t change the output generated by ^f1().
So the output should be “Test executing test is TESTVALUE”, shouldn’t it?


  [ # 3 ]

I did not say $$_test was local. I said $_test would be local.
$$ are global transient and $ are global permanent.

$_ are pure local to a macro or a topic during its current incarnation (if the topic calls something that then invokes the topic again, that is a separate incarnation.


  login or register to react