LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

For loop in a while loop

Solved!
Go to solution

@altenbach wrote:

Since a FOR loop that iterates zero times basically does not do anything new, here's another silly solution; 🙂

 

altenbach_0-1648657964744.png

 

(Also, there is a +1 primitive that you don't even need if you would adjust the random range accordingly. "x+y" is not a useful label, there needs to be a way to stop the while loop. The while loop probably also needs some timing, etc.)

 

I agree that we would need significantly more context to find a good solution to whatever the OP is trying to

do. e.g. by looking at the real code and not some stripped down example.

 

  • Is the while loop a toplevel while loop?
  • What is the purpose of the FOR loop?
  • How does it relate to the overall user experience when running the program?
  • ...

 


I missed the simplified vi (I think it came in while I was typing a reply), but I agree that it leaves too much context out to understand the real application.

0 Kudos
Message 11 of 14
(441 Views)

And if you don't like red (coercion dots) and green (booleans), one could do as follows: (still silly!!!)

 

altenbach_0-1648659772779.png

Or even ...

 

altenbach_0-1648659972555.png

 

0 Kudos
Message 12 of 14
(435 Views)

What I'm not understanding is the Poly instance.   Am I really missing something?  Isn't there a U8 instance?


"Should be" isn't "Is" -Jay
0 Kudos
Message 13 of 14
(428 Views)

@JÞB wrote:

Isn't there a U8 instance?


No, only U64, I64, and DBL.

 

(Also note that there are bugs!)

 

Ideally, this should be a VIM where the output adapts to the input representation of the lower and upper limit. 😄

Message 14 of 14
(421 Views)