Pages: [1]   Go Down
Author Topic: problem in while language  (Read 176 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: 82
Posts: 3123
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: 23
Posts: 1060
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: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Offline Offline
Edison Member
*
Karma: 17
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: