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
 Comments on same line as #define
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

efortier
Ketchup Master

Canada
89 Posts

Posted - Dec 28 2005 :  2:07:16 PM  Show Profile  Reply with Quote
Hi,

I'm not sure if this was fixed in a new version as I'm using build 1434, but when placing a comment at the end of a #define, the suggestion box always open and inserts text. Here is an example:

#define MAX_WAIT_TIME 123 // wait for ...

After I type wait and press space, VAX inserts "wait_a_bit".

Thanks,

--Eric

VS2005 Pro/Team Suite English
http://www.tlnewsreader.com

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Dec 28 2005 :  6:23:14 PM  Show Profile  Reply with Quote
i thought that the pre-processor replaced MAX_WAIT_TIME with *everything* that comes after it to the end of the line, which would include your comment in this case.

are comments a special case that i am unaware of? or is this just a made up example?

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

support
Whole Tomato Software

5566 Posts

Posted - Dec 28 2005 :  7:15:47 PM  Show Profile  Reply with Quote
Do you have "Accept with any character..." enabled in the "Text editor|Listboxes" node of our options dialog? If so, we suggest you disable it and accept only with Tab and/or Enter.

Edited by - support on Dec 29 2005 1:54:16 PM
Go to Top of Page

ether
Tomato Guru

USA
130 Posts

Posted - Dec 29 2005 :  05:32:50 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

i thought that the pre-processor replaced MAX_WAIT_TIME with *everything* that comes after it to the end of the line, which would include your comment in this case.

are comments a special case that i am unaware of? or is this just a made up example?


You are correct. The uses of a macro/define are replaced by the C/C++ preprocessor with everything following the macro name until it reaches a new line not preceeded by \\.
Go to Top of Page

efortier
Ketchup Master

Canada
89 Posts

Posted - Dec 29 2005 :  2:16:44 PM  Show Profile  Reply with Quote
quote:
Originally posted by ether
You are correct. The uses of a macro/define are replaced by the C/C++ preprocessor with everything following the macro name until it reaches a new line not preceeded by \\.
So this means that VAX will check what I type even in the comments at the end of the #define line?

--Eric

VS2005 Pro/Team Suite English
http://www.tlnewsreader.com
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Dec 29 2005 :  5:09:57 PM  Show Profile  Reply with Quote
VA X does not check much of anything per se, except maybe if symbols are valid in the current context or not. This is the case whether at the end of #define or anywhere else in your code.

As for this instance...

VA X knows you are typing a comment when your caret follows // on a #define line. VA X does what it does with all comments -- helps you complete words by offering suggestions (notice we say "words," not "symbols" since you do not have context when inside a comment. VA X garners suggestions from lots of places when inside a comment, including what's in your source file.

Intellisense and the like features, e.g. completion listboxes and parameter info, do not work inside comments -- again because your words do not have context.
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