×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Personally, I've don't like the break that's required in other languages. I've never once wanted to not break.
-----Original Message-----
From: mlazarus [mailto:mlazarus@xxxxxxxxxxxx]
Sent: Monday, January 28, 2019 11:38 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: SELECT block enhancement?
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
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.