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
 Can't rename macro argument
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

legalize
Tomato Guru

USA
119 Posts

Posted - Jun 22 2014 :  2:04:31 PM  Show Profile  Reply with Quote
Test suite: http://d3dgraphicspipeline.codeplex.com/releases/view/39824

Test case: R25

Rename not available for macro argument x_.
// #TEST#: R25 Rename this macro argument
// #TEST#: R26 Rename this macro
#define MACRO_ONE_ARG(x_) (2.0f*x_)

http://legalizeadulthood.wordpress.com

feline
Whole Tomato Software

United Kingdom
19008 Posts

Posted - Jul 03 2014 :  11:56:24 PM  Show Profile  Reply with Quote
Yes, but the problem is that a macro, in isolation, does not have to be valid code. There is no requirement that a macro will contain matching brackets, and I often see macros that do not contain matching brackets, where you need to pair a start and end macro to get the brackets to match.

Because of this, VA does not try to do to much with macros in isolation.

I agree that your macro is balanced, and its tempting to argue it should be a function, not a macro, where we can hope for matching brackets.

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

legalize
Tomato Guru

USA
119 Posts

Posted - Jul 08 2014 :  11:34:28 AM  Show Profile  Reply with Quote
We're talking about renaming the argument in a macro with arguments. Whether or not the macro has matching brackets, braces, etc., is irrelevant. The use of the macro argument is entirely within the macro definition and nowhere else.

http://legalizeadulthood.wordpress.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19008 Posts

Posted - Jul 09 2014 :  3:47:38 PM  Show Profile  Reply with Quote
This makes sense, I am wary of trying to be to clever with macros, given how complex some of them get, but you make a very good point. I have put in a feature request for this to see what our developers make of it:

case=83603

zen is the art of being at one with the two'ness
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