From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nested Structures

I'm generally opposed to deeply nested structures.

But I just did this:

paul_a_cardinale_0-1695233650385.png

Worse yet, I'm not even ashamed of it.  One of the benefits of getting old is that the shame center in your brain shrinks (and eventually disappears!).

Message 1 of 5
(797 Views)

At least you got the colors in the right order. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 5
(788 Views)

Looks like some tool, I would also take a similar approach. This piece of code is still readable and clean - that is what that matters for a tool.

 

In some cases, modularization doesn't make sense.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 5
(757 Views)

After I got it debugged, it came out like this:

ns2.png

0 Kudos
Message 4 of 5
(659 Views)

@paul_a_cardinale wrote:

I'm generally opposed to deeply nested structures.

But I just did this:

paul_a_cardinale_0-1695233650385.png

Worse yet, I'm not even ashamed of it.  One of the benefits of getting old is that the shame center in your brain shrinks (and eventually disappears!).


When scripting is involved, nested case structures are next to impossible to avoid.  Other general wiring rules also tend to get thrown out the window due to scripting.  No need to feel shame about this.


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
0 Kudos
Message 5 of 5
(652 Views)