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
 Issue with "double" getting undefined
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

diarrhio
Ketchup Master

53 Posts

Posted - Apr 28 2010 :  3:14:05 PM  Show Profile  Reply with Quote
Not sure if the subject really describes the problem, but whatever.

Anyways, we have some third party library (Matlab) which has a section of code which looks like this:

#ifdef NO_FLOATS
# define double double_not_allowed
# define float  float_not_allowed
#endif /*NO_FLOATS*/


We don't have NO_FLOATS defined anywhere, so I am assuming that VAX will simply ignore the #define of double. This is not the case, unfortunately.

All double variables in our code, all methods that return a double become unrecognized by VAX. Actually, they aren't totally unrecognized. Here is what I see on some double local variable I declare:

double someValue = someOtherDoubleValue;


someValue in the line above will simply be uncolored. However, subsequent references to someValue will be underlined with red as unrecognized. Oddly, if you hover over any reference to someValue (which is underlined as red), you will see the tooltip properly describe the variable (i.e. the tooltip will say "double someValue")

I am using latest version of VAX, 182. This issue has been around for a loooooong time though. Finally got sick of it enough to say something :)

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 29 2010 :  03:51:08 AM  Show Profile  Reply with Quote
VA parses both active and inactive code so can help with suggestions regardless of the active configuration. (i.e. debug, release)

To workaround this, you can place

#define double double
#define float float

lines into VA's stdafx.h. This is only parsed by VA and the macros won't get overwitten later. You can find info about how to edit this file here:

http://docs.wholetomato.com?W302
Go to Top of Page

diarrhio
Ketchup Master

53 Posts

Posted - Apr 29 2010 :  11:28:27 AM  Show Profile  Reply with Quote
Got it. Thanks.
Go to Top of Page

diarrhio
Ketchup Master

53 Posts

Posted - Apr 29 2010 :  11:59:51 AM  Show Profile  Reply with Quote
Hmmmm. That didn't seem to help.

I copied the StdAfx.h file from the Program Settings location to %DOCS&SETTINGS%\\Application Data\\VisualAssist\\Misc\\ and added the two lines to the bottom, making sure I had newlines after the defines.

Now, if I ctrl-click on "double", it doesn't take me to the #define found in the Matlab headers (like it used to), but it shows me a huge list of every place where double is a return value of some function or typedef'd in someway (i.e. most of these are in the stable Visual Studio includes like the Platform SDK and c-runtime includes.

Any other ideas?

BTW, I wasn't able to attach a 128kb jpeg screen grab to this post. Kept getting errors saying file was too big, was using invalid characters, etc. Don't think any of those were the case.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Apr 29 2010 :  12:56:38 PM  Show Profile  Reply with Quote
You can send the screenshot to us via this form:

http://www.wholetomato.com/support/contact.asp

Please include the URL of this thread in the description so we can match it up.

Are you using this MATLAB?
http://www.codeproject.com/KB/cpp/matlab_cpp.aspx
Go to Top of Page

diarrhio
Ketchup Master

53 Posts

Posted - May 03 2010 :  11:27:20 AM  Show Profile  Reply with Quote
I submitted a ticket last week. Any word on this?

Thanks
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 03 2010 :  3:19:57 PM  Show Profile  Reply with Quote
Apologies for the delay in getting back to you about this.

I got the screenshots, thank you. I tried several ways to stop double from being overwritten but did not find any, I've asked the developers about this.
I'll get back to you.
Go to Top of Page

diarrhio
Ketchup Master

53 Posts

Posted - May 03 2010 :  3:20:53 PM  Show Profile  Reply with Quote
Thanks for the quick update! And I'm glad you were able to reproduce.

Edited by - diarrhio on May 03 2010 3:21:37 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 03 2010 :  3:34:45 PM  Show Profile  Reply with Quote
Actually I did not used the trial to reproduce this. Their process of getting a trial is not as trivial as I thought.
However, based on the information you had provided, I could create a simplified environment and saw the same problems as you.

Edited by - accord on May 04 2010 3:07:01 PM
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jun 03 2010 :  2:14:08 PM  Show Profile  Reply with Quote
We have an internal fix for this (undergoing testing). In the meantime, adding the following lines to VA's stdafx.h file should fix the problem.

# define double signed double,
# define float signed float,

http://docs.wholetomato.com?W302
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Jun 12 2010 :  03:13:09 AM  Show Profile  Reply with Quote
The internal fix referred to by support was case=43586.
case=43586 is fixed in build 1827.
Go to Top of Page

diarrhio
Ketchup Master

53 Posts

Posted - Jun 14 2010 :  12:48:54 PM  Show Profile  Reply with Quote
Excellent!
Go to Top of Page

diarrhio
Ketchup Master

53 Posts

Posted - Jun 15 2010 :  1:20:22 PM  Show Profile  Reply with Quote
Just confirmed that this has been fixed. Thank you!
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