Syntax colorizer fun with C++/CLI

I was reading Brian Johnson’s Weblog and there was a comment by Ramon de Klein where he expressed unhappiness with the addition of so many new keywords in C++/CLI. I replied to Ramon saying that there were essentially just three new keywords that might clash with existing code – nullptr, gcnew and generic.

And just to prove my point I typed in a simple for loop into a test program and used some of the contextual identifiers as variable names. It compiled of course, but what made the whole thing funny was that the VC++ syntax colorizer was not able to identify their context and showed them in blue (as keywords) and this obviously produced some curious looking color-formatted code.

My blog’s syntax colorizer (developed by Jambo Johnson) also results in the same funny looking code and I thought I’d include it here for you all to see πŸ™‚

int finally = 0;
int delegate = 6;
for(int abstract=0; abstract<10; abstract++)
{
    finally += abstract * delegate;
}

You will indentify the humor only if you’ve used VC++ for a while now and are used to the syntax colorizer, because only then will the fact that everything is in blue (keyword color) will strike you flat on your face πŸ˜€

Advertisements

7 thoughts on “Syntax colorizer fun with C++/CLI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s