Assign vs Set By-Ref Var

Within a macro a local var can be be set by either the “Assign” or the “Set By-Ref Var” nodes. Is there a difference in any way?

Also, why is the “Variable” input pin of “Assign” a regular dot instead of a diamond?

image

Diamond means is it a “by-ref setting”. It can be used outside of macros, for example inside of a function it can set an external variable plugged to it (using a regular get), very handy.

I always have used “assign” to change local macro variables, I didn’t know it can be done with a “set by ref”

2 Likes

The pin shapes from “Assign” seem to be somewhat buggy (only visually as far as I can tell, the logic works as expected)

image

This is so strange.
With this way i don’t need to create some variables that are only used once. use Local Wildcard node in macro and use assign node in other macro and then use these macros externally, which will work like charm.