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
 Variables with same name as functions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mkipper
New Member

Canada
7 Posts

Posted - Dec 23 2010 :  3:26:56 PM  Show Profile  Reply with Quote
VAX cannot figure out that I'm using foo as a variable in the example below; it colours it as if it's a function, not a variable.
I don't think this is expected behaviour.



void foo(int param)
{
	int foo = 0;
	int bar = 0;
	foo = bar = 7;
	return foo + bar;
}

Michael Kipper
Software Engineer
Altera Toronto Technology Center

[email protected]

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 27 2010 :  5:00:43 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=19889

To a degree this is a known problem. The basic problem is that our coloring code has to run very quickly, to keep up with scrolling through the code. So it is possible to confuse our coloring code, using the same name for different things in the same file is a way to do this.
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