This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Statements: break and continue


Can't there be a break(depth) and continue(depth) to specify the deepness to
act on?
example:

[some code]
for (int x = 0; x < 10; x++) {
    for (int y = 0; y < 10; y++) {
        if (x == 5 && y == 8) {
            break(2); // get out of BOTH for loops
        }
    }
}
[some code]

This would be highly convenient as the workaround is unattractive.
PHP has this great feature, surprisingly.
Perhaps you have not added this for standards compliance?
I'm mailing about this because this issue has always disturbed me.
I'd like to have some insight on this matter...



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]