Not a bug

Recursive Evaluation

Anonymous 2 years ago in Studio / Variables • updated by Gandalf 1 year ago 5
After reading about how the Datalist caters to recursive evaluation I thought this was interesting and wanted to try it out.
From the technical documentation page:
"i.e. [[hello[[world]]]] would be recursively evaluated as [[hellobob]] where [[world]] had the value of “bob” and then [[hellobob]] as “my name is bob” where [[hellobob]] had the value “my name is bob” stored in it.

I decided to test this out myself. I created a variable [[hellobob]] and assigned the string "my name is bob" Then I created a variable [[world]] and assigned "bob". Finally I created a variable [[result]] and assigned [[hello[[world]]]]. To my disappointment I received a parse error.

I went back and added the variable [[hello]] and assigned "hello"
And then changed my assignment of [[result]] to [[[[hello]][[world]]]]
This produced the expected result. In the debug window it read my assignment as Variable [[result]] = New Value [[hellobob]] with the string "my name is bob" as its value.

I don't know if this is technically a bug since it did behave in a recursive manner when I tried the second time, but perhaps the documentation is wrong. When I set [[result]] to [[hello [[world]]]] It returned [[hello bob]] an unassigned variable. But with no space there, [[hello[[world]]]] results in a parse error.
Thanks for picking this up. You are correct, there is a bug and we are working at.
We are thinking of depricating this functionality. Can you give me your use case?

Removed this type of evaluation from the documentation as we decided not to support it.