-
I am tying myself into knots trying to identify and parse all mutation functions prior to Eval so I can avoid the |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Can you please give me an example of what you are experiencing? |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, there isn't a helper function to do this yet. So you will need to manually handle it like you outlined above. Note that this can apply to Set, Collect, ClearCollect and possibly other functions in the future. curious - do you need Set, or can you use Named Formulas? See Engine.SetFormula. |
Beta Was this translation helpful? Give feedback.
-
Another possible solution would be to extend Engine/RecalEngine class into your own Engine to identify and address any missing variable. |
Beta Was this translation helpful? Give feedback.
-
OK, so I am going to close this one out for now. It seems to me that at this point in the language evolution the only approach I can take that doesn't send me down endless rabbit-holes is just to force my users to declare Context and Commands in separate properties, and that there is--for the moment--no practical way for me to offer users a single scripting window where they can seamlessly write Commands and have Variables implicitly declared. |
Beta Was this translation helpful? Give feedback.
Unfortunately, there isn't a helper function to do this yet. So you will need to manually handle it like you outlined above.
Part of the reason is that the analysis can get very complex in "whole document" scenarios. For example,
Set(x,y); Set(y,z); Set(z,x)
would need to detect the chain and circular reference. And this could potentially spread across multiple expressions.Note that this can apply to Set, Collect, ClearCollect and possibly other functions in the future.
curious - do you need Set, or can you use Named Formulas? See Engine.SetFormula.