Goto needed in a Java for loop with lots of 'switch-case' statements
807580Apr 27 2010 — edited Apr 29 2010Unbelievable. I really need the 'goto' statement.
I'm completing a file parser-inserter method that inserts data from a second file during the parsing of a first file.
A huge 'for()' statement with 9 levels of embedded 'switch-case' and 'if' condition statements. About 4000 lines. Months of work. But this method is not dividable, is clearly documented and works fine.
In seldom cases, I should have great benefice if I could disturb the main 'for()' loop and the 'switch-case' routing, retaining the state before the de-routing and restoring it at the right time. Therefore, I absolutely need the 'goto label' capability. A label at the head of each embedded 'switch-case'. It is all very clean, I can assure you.
My NetBeans IDE recognizes the 'goto' word (turning it in blue). What is the exact syntax of the calling statement (goto mylabel;) and the called line (mylabel:) ? Or is 'goto' really not provided by Java ?
Thanks.