Jim,
>>It is unstructured since changes the normal logical flow the code, like GOTO does. Sure LOOP goes to the top of iteration structure, and EXIT to the line immediately preceeding. In both cases, however, they can make maintaining the code more difficult, since they corrupt the logical sub-ordination of the indentation structure. And there's no arguing about this, since that's the purpose of indentation.
>
>I wasn't aware that indentation was the definition of "structured code". I yield - you are correct.
>
>I will pay the price when necessary because my personal preferences are (as regards this):
>1) readable code;
I'm fond of saying, "If it ain't readable, it ain't maintainable". Let suggest that doing away with LOOP and EXIT can make code more readable. Consider the following:
DO WHILE DO WHILE
IF IF NOT
LOOP
ENDIF * of the code to the left
ENDDO ENDDO
>2) code that does not 'force' a condition (counter beyond value or condition now obviated) WITHIN A STRUCTURE (this is a problem in waiting);
>3) code that does not continue to process the loop condition when it is no longer necessary (IF condition(s) detects nothing more required so they do nothing but allow the natural loop to complete). This is just wasteful.
>
>Your preferences are what they are and mine are too. They both end up with working programs.
>
>Regards,
>
>JimN
George
Ubi caritas et amor, deus ibi est