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
 Feature Requests
 new refactor options: convert and eval
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dusan
Whole Tomato Software

Slovakia
177 Posts

Posted - Oct 13 2013 :  03:26:48 AM  Show Profile  Reply with Quote
Many times when I need to convert value from HEX to DEC or from degrees to radians or grads, I have to open Windows Calculator :)

I thing it would be handy to have such refactor in VA X:

examples:

int m_val = 123456;
After convert to Hex:
int m_val = 0x1E240;

double m_angle = 125.5;
After convert DegToRad:
double m_angle = 2.190388;

const wchar_t * m_str = L"Copyright: \\u00A9";
After convert to UTF-8:
const char * m_str = "Copyright: \\xC2\\xA9";

But handle also case when Code page of source code is applied:
for example if text is: L"Copyright: #169;", convert to UTF8 should work
and result should be: "Copyright: \\xC2\\xA9".
[edit: should be Copyright sign (C)]

And so on...

Another perhaps not refactor could be a place result of expression:
lets say I write:
double x =
now I click VA X -> Eval expression...
in input box i would write: "cos(radians(125.5))"
and result would become:
double x = 0.999275;

And this could be resolved using $EVAL($Expression$)$ snippet :)





Edited by - Dusan on Oct 13 2013 03:28:48 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 14 2013 :  3:37:26 PM  Show Profile  Reply with Quote
I have put in a feature request for a new "convert" refactoring command with your examples to see what the developers make of it:

case=77617
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 16 2013 :  4:19:56 PM  Show Profile  Reply with Quote
Regarding the expression evaluator: how often do you do something like this? Personally, I would rather use a more professional solution like wolframaplha.com or at least Google. I tried the latter and it's able to solve your expression. :)

Anyway, have you tried Simple Math Expression Parser?
http://visualstudiogallery.msdn.microsoft.com/cb785c42-c82e-4ca9-8088-df78f4d4efcd

I haven't but it may worth a try.
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