Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 new refactor options: convert and eval

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Dusan Posted - Oct 13 2013 : 03:26:48 AM
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 :)




2   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Oct 16 2013 : 4:19:56 PM
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.
accord Posted - Oct 14 2013 : 3:37:26 PM
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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000