If possible, you could make that section of code a seperate function, and use 'return' from any point in the nested loops to effectively break out. The number of parameters that would be needed to be passed to this routine could make this unacceptable, in which case you could use the dreaded 'goto'.