LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to exit a while loop ?

Solved!
Go to solution

Now I'm totally confused.

Folks, do you want to make me crazy ?

In Visual Basic it's "exit" in C it's "break".

The enclosing loop is immediately checked out.

Look at the Visual Basic Code.

0 Kudos
Message 11 of 13
(1,018 Views)

The basic differences between for loops and while loops is that a for loop runs a limited number of times (as set by N or an auto-indexing input), while a while loop runs an unlimited number of times while a condition is met (stop if F) or until a condition is met (stop if T).

A while loop runs at least 1 time while a for loop can run 0 times, but if a run (or iteration) is started all the code inside the loop has to be executed.

So basically there is no such thing as an break or exit

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 12 of 13
(1,001 Views)
loop condition - Loop-Zustand
Message 13 of 13
(980 Views)