Let's say I'm building a fairly long compound expression that has some repeated parameters - I would like a way to specify (without creating additional locals) a variable/macro for use just within that expression.
For example, instead of:
Locals.CommandLine = "cmd /c C:\some path\that\is\reused" Locals.CommandLine += " /path C:\some path\that\is\reused"
I could specify:
#pathmacro "C:\some path\that\is\reused" Locals.CommandLine = "cmd /c " + pathmacro Locals.CommandLine += " /path " + pathmacro
The idea being that with this I only need to update the macros in one place in a long expression.
This is a simple example, but hopefully you can see why this would be useful and why I wouldn't want to create lots of locals when the values are required only within the expression.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm closing this and adding a link to this description in the other post.
https://forums.ni.com/t5/NI-TestStand-Idea-Exchange/Expression-Variables/idi-p/2678825