Pages: [1]   Go Down
Author Topic: problem in while language  (Read 228 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello...may i ask, is it valid to use while and if in the loop?
Logged

California
Offline Offline
Faraday Member
**
Karma: 91
Posts: 3426
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You mean nest an if statement within a while loop? Sure.
Logged

London
Offline Offline
Edison Member
*
Karma: 48
Posts: 1462
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You mean nest an if statement within a while loop? Sure.

Although less common, you can also nest a while loop within an if statement.
Logged

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 104
Posts: 4631
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Or if by loop you mean the void loop(), then yes to that as well.
Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"We don't know your question, but the answer is yes"
Logged

Pages: [1]   Go Up
Jump to: