‎06-21-2007 07:29 PM
‎06-22-2007 08:00 AM
@smercurio_fc wrote:
I've said this before, and I'll say it again: GLOBAL VARIABLES ARE NOT EVIL.
I agree. However, in this particular application, a queue is already in use in the sub VI. The more appropriate solution is to simply move the already existing queue into the main VI so that both can access it and stop the program. Adding a global into the mix will only complicate things.
I certainly don't completely disregard globals, but when there is a better solution, I will use it over a global any day.
‎06-22-2007 08:27 AM
‎06-22-2007 08:47 AM
‎06-22-2007 09:16 AM
‎06-22-2007 09:54 AM
Well said. I don't want to get into a debate either. I'm a newcomer to LabVIEW compared to you (about 2 years experience) and I don't for one second doubt your knowledge.
My criteria for "better" in this particular example was the fact that he had already implemented a queue to control 3 while loops. Since it was already there, he might as well take advantage of it. Depending on the situation, a global could be a very viable option. I only said I avoid them because I personally don't like working with them.