I'm throwing this out there to see what people think of the idea.

Has anyone run into the need to have a "NEXT" or "CONTINUE" or "NOBREAK" opcode in a SELECT block? It would move on to the next WHEN condition instead of exiting the entire SELECT block.

GotIt = *Off ;

SELECT ;
WHEN X = 1 ;
CHAIN FILE1 ;
IF %Found( FILE1 ) And DeleteFlag1 = *Blank ;
GotIt = *On ;
ELSE ;
NOBREAK ;
ENDIF ;

WHEN Not GotIt ;
CHAIN FILE2 ;
IF %Found( FILE2 ) And DeleteFlag2 = *Blank ;
GotIt = *On ;
ELSE ;
NOBREAK ;
ENDIF ;

WHEN Not GotIt ;
CHAIN FILE3 ;
IF %Found( FILE3 ) And DeleteFlag3 = *Blank ;
GotIt = *On ;

ENDSL ;

This is a simple example, but it demonstrates a desire to have a "cascading" set of conditions, using the existing SELECT structure, but allowing the next set of condition(s) to be executed, instead if needing to repeat the previous conditions or adding an exit value for nested conditions.

We've all found ways around it, but I think it would be a nice addition. It's basically the opposite of C's break opcode.

-mark

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].