what does __leave do?

Francois Gouget fgouget at free.fr
Mon Jan 13 13:07:25 CST 2003


On Mon, 13 Jan 2003, Greg Turner wrote:

>
> Could someone run the following code under a microsoft compiler for me,
> and let me know the result?
>
> main() {
>   int x = 0;
>   __try {
>     x = 1;
>     __leave;
      x = 3;
>   } __finally {
>     x = 2;
>   }
>   printf("x was %d\n", x);
> }

I modified it as shown above and it prints:
x was 2

So '__leave' is like a 'break' but for exception blocks.

-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
      Broadcast message : fin du monde dans cinq minutes, repentez vous !




More information about the wine-devel mailing list