Will, This type of logic is a common practice when you can have an Abort situation in the middle of processing data.
You are correct in your examples they are the same. But that is not the point here. You must remember that we are in two FOR..NEXT loops with possible 1000s or 10,000s loops. If we are processing and suddenly a resource goes off-line, then we need to abort the process. My construct is a great way of handling the abort. Your way doesn't work because the values of G or H can change if you just keep looping on your FOR...NEXT loops. The original poster wanted to EXIT out, and stop processing. David A. Green (480) 813-1725 DAG Consulting -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Wjhonson Sent: Thursday, April 19, 2012 3:24 PM To: [email protected] Subject: Re: [U2] EXIT ; EXIT inside a loop Loop until done.flag do repeat is the same as Loop until (a=b) do repeat You don't need a done.flag in this case -----Original Message----- From: David A. Green <[email protected]> To: 'U2 Users List' <[email protected]> Sent: Thu, Apr 19, 2012 3:21 pm Subject: Re: [U2] EXIT ; EXIT inside a loop Will, The DONE.FLAG allows the program to gracefully exit out without having to go hru frivolous loops. David A. Green 480) 813-1725 AG Consulting ----Original Message----- rom: [email protected] [mailto:[email protected]] n Behalf Of Wjhonson ent: Thursday, April 19, 2012 3:18 PM o: [email protected] ubject: Re: [U2] EXIT ; EXIT inside a loop You don't need a DONE.FLAG at all just loop until the criteria is hit _______________________________________________ 2-Users mailing list [email protected] ttp://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
