Re: More Wish List

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek Parnell wrote:

>    for i = 1 to length( s ) do
>       ... code goes here ...
>       if test1 then
>          exit code1
>       end if
>       ... more code can go here ...
>       if test2 then
>          exit code2
>       end if
>       ... more code can go here ...
>    when code1
>       exception processing ...
>    when code2
>       exception processing ...
>    end for

I'm not entirely clear what's happening here. If the intent is to allow the
user to jump to the bottom of the loop, run the exception processing, and
exit, this will accomplish the same thing, with no new construct and the
same amount of code.

   for i = 1 to length( s ) do
      ... code goes here ...
      if test1 then
         code1 exception processing
         exit
      end if
      ... more code can go here ...
      if test2 then
         code2 exception processing
      end if
      ... more code can go here ...
   end for

Am I missing something?

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu