LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Herbert

Array/String not empty function

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

How often did I have to correct this bug in my code:

 

The coding idea is     "if array not empty, do ...."      and so I wire the output of "Empty Array?" to a case structure and start coding. Dependent on the time of the day however I forget that the dropped case structure is on "True" and that I have to put my code into "False". The same happens with "Empty String .." and and "Not a Number / Path / Refnum ?"

Couldn't we have the negated functions as well, accessible by "right click", as we have them in the compound arithmetic?

Furthermore, I wish the negated versions to be default.

 

Array_String_NotEmpty.jpg

6 Comments
AristosQueue (NI)
NI Employee (retired)

Speaking for LV R&D:

a) Making nodes with the inverted meaning be the standards on drop would break the minds of the other half of the population for who "is empty?" is the intuitive way to ask the question. This is one of those 50/50 problems. I think you'll just have to live with this -- switching it would just cause more confusion while people adjusted to the new default and even after that settled, we'd have people writing Ideas wanting it switched back.

 

b) We could add inverted nodes or the ability to add the inversion dot, just not as the default. Let's see how the kudos count goes.

 

Speaking as AQ, LV user:

I hate the inversion dots. They're invisible and too easily missed when reading code. I far prefer people use a Not node instead. If it were me wanting the inversion commonly, I'd create a few VIs that connect the "is empty?" and a "Not" together and edit my palettes to drop those as merge VIs. That would address the "drop inverted by default" part of this idea.

 

So, no kudos from me personally, but at least part of the idea is viable from R&D perspective.

CMal
Active Participant

@AristosQueue (NI) wrote:

I hate the inversion dots. They're invisible and too easily missed when reading code. I far prefer people use a Not node instead.


AQ, please don't underestimate the value of having a compact and clean diagram.  It's true that inversion dots as they currently exist are easy to miss, but a better solution would be to make them more visible, instead of gettng rid of them and using a separate node.  I don't even want to think about having to use invert primitives on a compound arithmetic function with many inputs.  The inversion dots make this sort of thing much more bearable.

 

I don't like the idea of inverting the outputs of the "empty..." functions by default.  I think a better idea would be to give all boolean inputs and ouputs on primitives the ability to be inverted, and let's also make the inversion dots bigger so they can't be missed so easily.

AristosQueue (NI)
NI Employee (retired)

> AQ, please don't underestimate the value of having a compact and clean diagram.

 

I don't underestimate it. There are compressions that I like and compressions that I don't like. The negate dots do more harm than good in my experience. I've debugged too many programs for other people who just kept missing that little dot. You suggest making them bigger. Yeah, that would help, but putting a Not node right after it is pretty much the same thing.

 

To be clear: I fully understand the folks who like the inversion dots. Those dots rub me the wrong way and seem like just another thing to teach new users about and another feature to maintain that just doesn't add much, in my opinion, over the Not node. But that's my personal opinion. I don't get in the way of such features when R&D decides to do them because of user requests. I just don't add my weight to convince people to do it. 🙂

crossrulz
Knight of NI

For those who do not know, the idea for making the inversion bubbles larger is here: Enlarge the Invert Circles

 

Any further discussion on the subject should be done in that thread.

 

Now back to this idea:

I could have sworn I have seen this idea posted before, but I am currently unable to find it.

 

I usually just take the result of these functions into a case selector so this would not help me that much.  I just make sure my comment on the case structure shows that the logic is inversed, usually something like "Message was NOT recieved?"


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

TomOrr0W
Member

Looking at the comments on this idea, I ended up searching invert, negate, bubble, and circle (skipping anything that was already marked duplicate).  I figured I might as well link the related ideas.

 

Strongly Related:

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Offer-a-Positive-Logic-Alternative/idi-p/1022834

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Negate-option-on-Comparison-functions/idc-p/3793254

 

Related:

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Shortcut-to-Invert-Input-Output-in-Compound-Arithmeti...

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Correct-the-quot-not-quot-symbol-by-removing-the-inve...

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Automatically-invert-compound-arithmetic-inputs-when-...

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/General-Comparison-Operator-as-an-Express-VI/idi-p/12...

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Simplifying-Boolean-expressions/idi-p/1890963

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Invert-Option-in-all-Boolean-Terminals/idi-p/1281058

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Invert-signal-going-into-a-select-VI/idi-p/2224232

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Negate-input-on-boolean-functions/idi-p/1084159

 

A couple people mentioned making inversion bubbles more visible:

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Enlarge-the-Invert-Circles/idi-p/1023748

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Replace-the-Invert-Circles-in-Compound-Arithmetic-Nod...

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Compound-Arithmetic-with-inverted-input-should-be-eas...