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
 Premature formatting on for statement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

DrB
Senior Member

28 Posts

Posted - Sep 11 2006 :  5:20:39 PM  Show Profile  Reply with Quote
I'm using C# in VS2005 with build 1534.

When I type something like:

for (int i = 0; i < 10;

As soon as I hit that second semi-colon, an automatic formatting takes place. The code below the for statement gets indented. Very annoying.

Thanks!

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 11 2006 :  11:39:36 PM  Show Profile  Reply with Quote
This is not happening for me. Can you look at the code above this to see if there is something (a syntax error, or a missing semicolon, perhaps) that could be confusing the parser?

Joe Pizzi
Go to Top of Page

DrB
Senior Member

28 Posts

Posted - Sep 12 2006 :  10:27:31 AM  Show Profile  Reply with Quote
I just tried it in a test .cs file with nothing in it but the following (the cursor is just after the 10 in the for statement as I'm typing it in):


class Test1
{
    public double A()
    {
        bool b = true;

        for (int i = 0; i < 10)

        if (b)
        {
            System.Console.WriteLine("Test");
        }

        return 0.0;
    }
}


As soon as I type the ";" after the 10, the code looks like this:


class Test1
{
    public double A()
    {
        bool b = true;

        for (int i = 0; i < 10; )

            if (b)
            {
                System.Console.WriteLine("Test");
            }

        return 0.0;
    }
}
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 13 2006 :  12:28:58 AM  Show Profile  Reply with Quote
I entered that code in a .cs file, and it does happen for me just like you say. The only thing is, if I disable VA, it still happens.

Sounds like it is the IDE. Do you have some indication otherwise?

Joe Pizzi
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