Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VAX 1532: bad "." to "->" in nested structs

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
pbrown Posted - Aug 16 2006 : 9:50:47 PM
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"
}
4   L A T E S T    R E P L I E S    (Newest First)
support Posted - Sep 19 2006 : 01:56:10 AM
Fixed in build 1535.
sean Posted - Aug 17 2006 : 9:47:42 PM
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 ->).
pbrown Posted - Aug 17 2006 : 09:08:43 AM
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.
sean Posted - Aug 16 2006 : 11:34:23 PM
If you pause for half a second after typing each symbol name in a chain (each letter in these cases), does it work properly?

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