I am having some trouble trying to simplify some logic that is contained in nested loops
I have provided some pseudo code below, that is the basics of what I'm dealing with. The actual code is more complex and contains multiple nested loop structures.
I'm in charge of maintaining this code, I'm not the original writer of it
Would this be a place that a goto is valid.
while(CONDITION)
{
while(CONDITITION2)
{
if(CONDITION3)
break CONDITION2
if(CONDITION4)
break CONDITION
}
}
There are many complexities to preforming these code breaks.
I am not allowed to use a goto, but I think it would be an easier solution that what I am currently trying to do. Should I try and justify the use of a goto in this case. thanks
PRASHANT :)