LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
prettypwnie

By Default, Don't Make Two Auto-Indexing Inputs

Status: New

I propose that if an array is wired into a for loop, the tunnel should be auto-indexing by default (current behavior) UNLESS there is already an auto-indexing input tunnel in that for loop (new behavior).

 

Generally, when I wire an array into a for loop, I want an auto-indexing tunnel, so I am happy that it creates one by default. However, when I wire a second array into the same for loop and it creates another auto-indexing tunnel by default. This is usually not what I want because it will cause the loop to stop early due to one array being smaller. I'm afraid that this default behavior may cause bugs for new programmers because they may not realize to change it (in fact, this has even happened to me before). Default behavior should be the "safe" behavior. Making the decision to have more than one auto-indexing input tunnel in a loop is one that should be carefully considered, so it shouldn't happen by default, but rather should be changed explicitly by the user.

 

I know there have been many ideas posted about the current auto-indexing default behavior, but I didn't see this specific one anywhere, and I think it is an important suggestion.

11 Comments
AristosQueue (NI)
NI Employee (retired)

> What is the second input? The top wire or the bottom wire?

 

The second one wired -- chronological order, not physical order.