Next time, please keep the subject line short and put the bulk of the question in the body of the post. Thanks!
You probably need to give significantly more detail on what the program is supposed to do. Are you sure it is correct?
- What causes a value change event for the array and how often does that happen?
- Why is "array" extended precision?
- Define what you mean by "toggling"?
- What is the purpose of the two loops? What is the purpose of the upper loop, the lower loop?
- It seems that the upper loop waits until the first notification occurs, (which is always true, so why is there even a false case? and then indepedently rattles through the entire "array string" array with its own timing and at the very end updates the "Array" control), then start over with the same thing, ad infinitum.
- On occasion (i.e. whenever the event occurs or somebody clicks "writing"), the upper loop stops short, just to start over in the next iteration of the upper while loop.
- The lower loop waits at the event structure until somebody manually changes the values in the "array" (i.e. fighting the values from the upper loop!) , then does a DS write with the fourth element of the string array and sending the first element of the ext array.
- How do you stop the upper while loop?
- Your overuse of local variable blurs the distinction between controls and indicators. Most can be operated by the user and are also modified by the program. Seems like a mess! Whatever happens last wins.
It just does not make a lot of sense!