02-20-2006 09:44 AM
02-21-2006 11:40 AM
Hello,
I think the heart of your question was: "I have an idea to build a "for loop" to loop throught the from 0-69; but i can't figure out how can I compare the user input to decide whether this loop is needed to skip or get into ...."
I am not sure precisely what you're comparing, but the comparison palette contains functions such as >, <, =, and many others which you can use to compare your data and make a decision. In order to "decide" to execute your for loop or not, you can use a Case Structure (from the Structures palette - the same place you get the for loop). You can wire the result of your comparison logic to the case selector, and only one case will execute each time through that piece of code. In general, the case selector can take many datatypes as input, such as string, enum, integer, boolean, and others.
02-21-2006 11:43 AM
PS - if you have arrays of data and would like to manipulate it element by element, you can wire the array into the for loop, and use the indexing feature to have the loop's iterations take the elements in order - when you do this you don't have to wire the the number of iterations to execute (the N input) and the for loop will execute a number of times equal to the size of the indexing array. You can disable indexing if you want to deal with the whole array in the loop by right clicking on the array's data tunnel leading into the loop.
Best Regards,
JLS