Is 'where' a keyword or type in VC++
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Is 'where' a keyword or type in VC++

  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,242

    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:-

    Code:
    int64_t where;
    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

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    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.

  3. #3
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,242

    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

  4. #4
    Join Date
    Jul 2002
    Posts
    2,513

    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.

  5. #5
    Join Date
    Aug 2005
    Posts
    198

    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
    {
    };
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com
    Instant C# - VB to C# Converter
    Instant VB - C# to VB Converter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center