EXIT works just as well as the UNTIL flag and CONTINUE

I just didn't want to setup a LOOP structure that wasn't
   really meant to LOOP, just to get the Blocking structure
   and the ability to use EXIT without having to setup labels.

It works...yes, but a year from now, I'm going to scratch my
head and wonder why I setup a loop that would never loop!?!

> -----Original Message-----
> From: [email protected] [mailto:u2-users-
> [email protected]] On Behalf Of Bob Woodward
> Sent: Monday, February 07, 2011 3:35 PM
> To: U2 Users List
> Subject: Re: [U2] Does UV have a "BLOCK" command
> 
> Check out the CONTINUE command.
> 
> IMDONE=''
> LOOP UNTIL IMDONE
>   Block code
>   Block code
>   IF condition THEN
>     IMDONE=1
>     CONTINUE
>   END
> REPEAT
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of George
> Gallen
> Sent: Monday, February 07, 2011 12:26 PM
> To: U2 Users List
> Subject: [U2] Does UV have a "BLOCK" command
> 
> I want to setup a block of commands,  and be able to exit out of the
> block if needed.
> Right now I use a LOOP/REPEAT with an EXIT statement before the REPEAT.
> I'd rather not use labels  (or subroutines).
> The Loop/Repeat works, it just looks weird since it isn't really a
> loop...
> I tried using an IF block, but I couldn't use the EXIT within that
> block
> IF (1=1) THEN..........END
> 
> LOOP
>    block code
>    block code
>    if condition then EXIT
>    block code
>    EXIT
> REPEAT
> 
> Would be nice if....
> 
> BEGIN BLOCK
>    block code
>    block code
>    if condition then EXIT
>    block code
> END BLOCK
> 
> 
> George Gallen
> Senior Programmer/Analyst
> Accounting/Data Division, EDI Administrator
> [email protected]
> ph:856.848.9005 Ext 220
> The Wyanoke Group
> http://www.wyanokegroup.com
> 
> 
> 
> _______________________________________________
> 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
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to