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 1246: definition bar and if's
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Aug 23 2004 :  11:33:37 AM  Show Profile
When the definition bar shows the location of an 'if' there are two issues:
1) multiline if's are broken and only the last line before the { is shown (see sample)
2) when using spaces instead of tabs, the definition bar shows ALL spaces between the statement and the curly bracket. Thus the bracket is at an arbitrary position.

sample:

if((somevalue == 1) &&
   (someothervalue) && 
   (!thenthisone))
{
 // ... statements
}
In this case the definition bar shows as current context "(!thenthisone)) {". When you add 20 spaces in front of the curly bracket, the definition bar will show 20 spaces between the if condition and the bracket.

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Aug 23 2004 :  3:27:10 PM  Show Profile
multi line if statement and definition bar, case=227
lots of spaces in the definition bar, case=228

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Aug 24 2004 :  7:42:41 PM  Show Profile
One more issue with the if's:
when the if has a trailing comment, the curly bracket gets added to the end of the comment. And is colored as comment of course.

sample:
if(whatever) // very important
{
}
The definition bar shows: if(whatever) // very important {
I think comments should be stripped out of the if. Trailing comments and comments on a line of their own between the if and the curly bracket.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Aug 25 2004 :  6:00:02 PM  Show Profile
comment after if added, case=238

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2321 Posts

Posted - Aug 26 2004 :  4:44:45 PM  Show Profile
Actually it seems that this problem is a problem of the curly bracket and not the if itself. The same things happen wherever you use curly brackets and the definition bar shows the context.
A switch, a macro, a function, anything produces the same result as described for the if. Just use a curly bracket.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000