Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1440 coloring

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
bugfix Posted - Jan 26 2006 : 02:29:05 AM
Something goes wrong w/ DWORD_PTR here.

what color should I use next mode ?:)


ok:


vax1440, c++, vs2k3

-bugfix
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 27 2006 : 2:56:19 PM
there is no need for examples to make sense, but somehow i had got hold of the idea that DWORD_PTR was some form of #define, so my brain started to hurt when i tried to figure out what the code was really saying

i don't think i have ever felt the need to overload a cast operator in one of my classes, so the first example did not feel familiar either, which did not help. now i see what you are doing, and it makes much more sense. thank you for the clear example of the effect

case=975
bugfix Posted - Jan 26 2006 : 3:43:27 PM
quote:

beyond that, i was under the impression that DWORD, and so presumably DWORD_PTR was a #define. am i wrong about this?


nope, both DWORD and DWORD_PTR are typedefs.
quote:

your code snippet does not make sense to me.


Since when do repro samples do have to make sense?:) If it compiles VAX should accept it as well imho.


Anyways I've found out what makes vax go nuts. It's the const variant of cast operator.
struct blub
{
public:
// fine
    operator const int*() const
    {
        return reinterpret_cast<const int*>(this);
    }
// fine
    operator DWORD_PTR() const
    {
        return reinterpret_cast<DWORD_PTR>(this);
    }
// uncomment block and DWORD_PTR is colored wrong
/*  
    operator const DWORD_PTR() const
    {
         return reinterpret_cast<const DWORD_PTR>(this);
    }
*/
};
feline Posted - Jan 26 2006 : 2:50:04 PM
i believe this is the same problem that causes:

void testFn()
{
    int nCount(3);
    nCount++;
}


to show the variable "nCount" in two different colours, once as a function (the constructor in this case) and once as a local variable. currently the colouring parser thinks that anything that looks just like a function is a function.

beyond that, i was under the impression that DWORD, and so presumably DWORD_PTR was a #define. am i wrong about this? your code snippet does not make sense to me.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000