-
July 20th, 2010, 03:05 AM
#1
Is 'where' a keyword or type in VC++
I'm using VC++8 to compile a program originally written for Linux. It builds fine but the original programmer occasionally uses variables called where - for example:-
My IDE is displaying the name where in blue (which is the colour it normally reserves for data types and keywords, such as int, bool, struct, true, false etc). event is another word that gets displayed in blue. Do these words mean something special in VC++?
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
July 20th, 2010, 03:37 AM
#2
Re: Is 'where' a keyword or type in VC++
AFAIK, no. But it is a part of SQL. Maybe is that the trigger. VC6 doesn't color it blue, so maybe it something specific from VC8.
-
July 20th, 2010, 03:44 AM
#3
Re: Is 'where' a keyword or type in VC++
Yes, when I first started building the project I was also using VC++6 but I don't remember it happening then. I've only noticed it since moving to VC++8.
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
July 20th, 2010, 04:11 AM
#4
Re: Is 'where' a keyword or type in VC++
To print blue keywords, VC++ IDE uses quite primitive way: there is some list of keywords, and every word from this list is shown with blue color. BTW, this list is extendable. It is possible to add new values to it (for example, many MFC programmers like to have CString coloured) - see details here: http://msdn.microsoft.com/en-us/libr...fined_keywords. However, I don't know how to remove a value from default list.
Anyway, this is not related to compiler. Blue word in the editor doesn't mean that compiler treats it as keyword.
-
July 20th, 2010, 04:45 PM
#5
Re: Is 'where' a keyword or type in VC++
It's used for C++/CLI generic constraints.
e.g.,
Code:
generic<typename T> where T : ISomeInterface
public ref class MyRefClass
{
};
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|