Of course all recent versions of LV have global variables, accessed from the structures palette, so why do people still refer to them or even use them?
1. More efficient memory storage. Beacuse the vi retains the same data space regardless of it use in the code, only a single call to the memory manager is made. If arrays are stored in the USR, and replace array element primitives used, then the memory space is efficiently used/accessed wherever the vi is called. 2. Built in data space protection. One problem that can happen with normal globals in LV, occurs if you try to write a value to the global in several places in your code, updates to the value are unpredictable with respect to time. This means that changes to the global can be subject to race conditions. This is especially true if you read/write to the global where a race condition could occur between the read and the write of the variable.
Related Questions
- I noticed a recent change in AMST course requirements. Does this mean I have to enroll in another 4 hours to meet the 20 hours of core courses instead of 16 hours?
- Of course all recent versions of LV have global variables, accessed from the structures palette, so why do people still refer to them or even use them?
- Whats the difference between the online and cd-rom versions of this course?