Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VAX 1532: bad "." to "->" in nested structs
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pbrown
Senior Member

USA
44 Posts

Posted - Aug 16 2006 :  9:50:47 PM  Show Profile  Reply with Quote
VAX newbie here.

VAX 1532 (and previous betas) seems to be converting "." to "->" incorrectly for a top-level substructure when using pointers to nested structures. I've run into this frequently in my everyday code when using vanilla C.

As a simple example:

typedef struct A_Rec {
    int a;
} A;

typedef struct B_Rec {
    A a;
    int b;
} B;

typedef struct C_Rec {
    B b;
    int c;
} C;

void ouch(C *c)
{
    A *a = &c->b.a;
    B *b = &c->b;
    c->b->a.a = 12;   // bad: I typed "c->b.a.a"
    c->b->a.a = 12;   // bad: I typed "c.b.a.a"
    b->a->a = 12;     // bad: I typed "b->a.a"
    b->a->a = 12;     // bad: I typed "b.a.a"
    a->a = 12;        // correct: I typed "a->a"
    a->a = 12;        // correct: I typed "a.a"
}

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 16 2006 :  11:34:23 PM  Show Profile  Reply with Quote
If you pause for half a second after typing each symbol name in a chain (each letter in these cases), does it work properly?
Go to Top of Page

pbrown
Senior Member

USA
44 Posts

Posted - Aug 17 2006 :  09:08:43 AM  Show Profile  Reply with Quote
quote:
Originally posted by sean

If you pause for half a second after typing each symbol name in a chain (each letter in these cases), does it work properly?


Yes. In actual coding use, the problem seems to be more intermittent. But it's frequent enough that this feature does me more harm than good.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 17 2006 :  9:47:42 PM  Show Profile  Reply with Quote
case=2131

If it is happening so frequently that it does more harm than good, then until it is fixed, you can disable the feature in the VA options dlg (Text Editor|C/C++ Convert dot to ->).
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Sep 19 2006 :  01:56:10 AM  Show Profile  Reply with Quote
Fixed in build 1535.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000