Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
HartyFartCloud
HartyFartCloud's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Nested while loop problem
[4 Replies]
24-Aug-2010 09:18 PM
Forum:
Programming Questions
Hi all,
I have an issue, It goes a little something like this:
while(true){
while(a && !b && !c){ // nested 1
while(a && b && !c){ // nested 2
while(a && b && c){ // nested 3
Do stuff!
}
}
}
}
a, b and c are user inputs and any combination of them can be true at any time,
I'm looking for the correct combination from the user...
Am I right in thinking that when the code gets to nested loop 2 as soon
as b becomes true I will get kicked out of nested loop 1 as !b is no longer satisfied?
I have it running on a separate thread as I want it to always be checking this,
the program has reached ''do stuff! but it is seldom an occurrence.......
If anyone has a fix or alternative please help
P.S. This is my first post, so bare with me if I am breaking any forum rules..
«Prev
Next »
Moderate user : HartyFartCloud
Forum