The solution with boolean array as input and output.
You wrote that there are millions of numbers. This solution has one disadvantage. The execution time and memory needs will increase overproportional with the length of the array. The reason is that the size of the output array is not know before entering the For loop. The build array function needs to allocate new memory when new numbers are added. And the old array will be copied.
To avoid this you can use a second For loop counting the cases when a number will be used. Copy the existing For loop. Initialize the shift register with a U32 and value 0. Replace the Build Array function by a increment. Replace the Array constant with the boolean by a Build Array function. In the second For loop replace the Build Array function in the Case structre by a Replace Array element. If you have the array initialzed with FALSE you need to do this only in the case when you want it to set it to TRUE. You need to count as in the first loop to know which element in the array will be replaced.
Message Edited by waldemar.hersacher on 06-05-2005 12:11 AM
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions