Say what?

Published 17 October 03 12:09 AM | oleglv 

I keep changing my mind whether C/C++ is a blessing or a cruel joke on us all. Sometimes I think it's great (when it lets me cast a block of memory to just about anything I want), and sometimes I really hate it(when it lets me cast a block of memory to just about anything I want). And sometimes, I come across something that makes my jaw drop again. 

Nothing new - just another confirmation that C is just full of warts of many kinds.

This time I was reading Eric Lippert's entry on exceptions ... yeah.  What do you think about this:

 

jmp_buf env;

            int i = 0;

            if ( setjmp( env ) <=100 )

            {

                        i++;

                        printf( "%d\r\n", i );

                        longjmp( env, i );

            }

Newsflash: that's a loop. Using ABBA's words, I wonder should laugh or cry...

Filed under: ,

Comments

# » Say what? MSDN Blog Feed said on January 11, 2008 10:34 PM:

PingBack from http://msdn.blogsforu.com/msdn/?p=815

Anonymous comments are disabled

Search

This Blog

Syndication

Page view tracker