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; } __finally { x = 2; } printf("x was %d\n", x); } thanks, -- gmt "If everyone is thinking alike then somebody isn't thinking." --George S. Patton
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(a)free.fr http://fgouget.free.fr/ Broadcast message : fin du monde dans cinq minutes, repentez vous !
On Monday 13 January 2003 01:07 pm, Francois Gouget wrote:
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.
cool, quick turnaround on that one. thanks. -- gmt "If everyone is thinking alike then somebody isn't thinking." --George S. Patton
participants (2)
-
Francois Gouget -
Greg Turner