BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Right Click Case Statement suggests replacing with a Stacked Sequence !!!!

I must admit that I don't usually right click a Case Structure often with the intention of changing it to something else.
 
A recent post made me look at the Case Structure to suggest how to change it into a "Disable DIagram Structure", so I figured maybe right-clicking it would offer that choice. ...
 
To my horror, the only replace choice is the most horrible of all structures!~!~!~!  the Stacked Sequence!~!  😠
 
Maybe I should suggest to change that in the product suggestion thread. 
 
Did other notice that before?  Yikes!  😮
 
RayR



Message Edited by JoeLabView on 06-22-2008 09:22 PM
Message 1 of 5
(10,428 Views)
I agree there is little logical resemblance between a case structure and a stacked sequence, so I don't quite see the usefulness of this option. I think it is very old, though, so it might have been retained for legacy reasons. Of course there is also the reverse, converting a stacked sequence to a case structure. I've never tried it but I wonder how it would handle sequence locals. 😉
 
I rather would prefer to be able to convert between case structures and event structures, something we cannot do. 😉
0 Kudos
Message 2 of 5
(10,419 Views)
I can see a use case, if you have a for-loop with the iteration index linked to the case selector. Such a structure can easily be replaced by a stacked case structure.

Just because it's a bad programming technique it shouldn't be made impossible.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 5
(10,407 Views)


TonP wrote:
Such a structure can easily be replaced by a stacked case structure.

Really???
 
A case structure has typically multiple code alternatives wired to the same output tunnels. This is logically incompatible with any kind of sequence and you'll get a lot of broken wires (I just tried it myself). So "easy" is probably not the right word. 😄
0 Kudos
Message 4 of 5
(10,403 Views)
I agree with Altenbach which is why I was so surprised.
 
Even if a For Loop was used to index a Case Structure, any of the exit tunnels would have a value for each of the Cases.  So how does the Stacked Structure stacj up to that?  😉  <pun intended>
 
Let's assume for a minute the the magic of Labview does convert the Case Structure somehow correctly.  Personally, I try to educate others to stay away from those darn structures...  But it's offered as a selection when right clicking a Case Structure..  So who are they going to believe?  A Stacked Sequence of 3 or 4 frames (max) might be okay if coded properly.  But that is not what I constantly see.  I keep seeing nested S-S 3 to 4 layers deep with as many as 100 frames!! 
 
- sigh -  😞
 
 
0 Kudos
Message 5 of 5
(10,381 Views)