From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I "remark out" an expression?

I want to temporarily ignore an expression. What can I put in front
of an expression or maybe the last part of an expression so that it is
ignored but remains there for later use?
0 Kudos
Message 1 of 3
(3,298 Views)
.



You can use an IF statement in the same expression with say.. a Switch like this:

IF(DebugSwitch,your_expression,default_value)

"default_value" can be, depending on where the Expression is used, a 0 or a 1 or an empty string, etc.

So, only when the "debug switch" is On your expression will be evaluated. You can choose not display the Switch if you fear someone would flip it unknowingly.

Hope this gives you some ideas...

Khalid 🙂



.
0 Kudos
Message 2 of 3
(3,298 Views)
When I do this I simply enclose the entire expression in quotations. Then the expression evaluates as text. If you have the result of the expression displayed on a panel as numeric the display will evaluate to zero. If the expression is used in any numeric or logical connections it will evaluate to zero.

But, I assume, if you are remarking it out it's result must not be used in any important functions.

-Tommy Scharmann
0 Kudos
Message 3 of 3
(3,298 Views)