|
Just because you are using an indicator, doesn't mean the system is isn't doing a compare. The system is comparing done to *on. Always use compare cycles for all versions of loops, "Peter Levy" <plevy@xxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 09/14/2006 02:05 PM Please respond to RPG programming on the AS400 / iSeries To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> cc: Subject: Re: infinite loop I always like use an indicator variable for inifinite loops: D Done s n inz(*off) /free DOU Done; //Do Stuff ENDDO; /end-free Then I use LEAVE to get out and never touch Done. This way you don't have to worry about the upper limits of *HIVAL nor do you waste cycles comparing 1 to 1. ----- Original Message ----- From: Lim Hock-Chai To: RPG programming on the AS400 / iSeries Sent: Thursday, September 14, 2006 2:26 PM Subject: infinite loop In fix format, I use to do below for infinite loop C do *hival is there a way to do this similar syntax in free format with declare a variable? -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.