Pages: [1]   Go Down
Author Topic: problem in while language  (Read 220 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: 88
Posts: 3380
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: 47
Posts: 1433
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: 95
Posts: 4316
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Roy from ITCrowd: Have you tried turning it off an on again?
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: