Iterating a For Loop on an array index, and repeating



I have a seemingly simple task, but I am new to LabView and visual programming:

I want to write a loop that iterates for each element in an array, and
then starts over again.  It will feed into a case structure. 
In textual programming, it would look something like this:


For each "element(i=1:3)" in "array(1DX3E)";
If "element(i)" < n, multiply by a;
If "element(i)" <m and >n, multiply by b;
If "element(i)" >m, multiply by c
end "for"

While "Start" = true, repeat for loop


From a beginner's perspective, the for loop only seems iterable on a
constant, for instance I could say repeat 3 times, but this is not
indexing to the unique element of the array.  Is there an elegant
way to do this in LV 8 without going from an array to a cluster,
un-bundling it, and then writing 3 different case
structures????????  This is what I have now and it is rather
obtuse!

Thanks for any input,
Brad
.



Relevant Pages

  • Re: How would you do this in forth?
    ... I thought I'd just code up a quick array based solution before making ... You might try doing "found" with a DO LOOP instead of BEGIN WHILE REPEAT ... If I doesn't have to be on the stack then not-yet and got-it: ...
    (comp.lang.forth)
  • Re: C question!
    ... Yes Tim, you are right! ... But I am using an array, ... you have an opportunity to replace that with an iterative loop. ... First, when you repeat code, you ...
    (microsoft.public.vc.language)
  • Re: Check value in Array
    ... your method needs, on average, to loop 224.9602 times. ... and then just shuffle the array. ... cell to see if the new random number is equal to that cell value. ... I have to repeat this step several thousands time and it ...
    (microsoft.public.excel.programming)
  • how many times repeat a number in an array??
    ... i have a function that gets from the user a random Array.by using the unique function i have a unique list with the arguments of the vector.with out using loop how do i find the times which a number is repeat in the array ...
    (comp.soft-sys.matlab)
  • RE: Error 3021
    ... Create proto-file names using the selected job names and storre to an array ... Save and close the document and repeat the loop ... Dim strJobsAs String, strDocsAs String, varValsAs _ ...
    (microsoft.public.access.modulesdaovba)