Quote Originally Posted by D_Drmmr View Post
That's horrible. Why would you advice someone to use a macro for this? A simple text-replace can solve this without obfuscating the code.

@OP Using two different names for the same variable will make your code harder to understand. When you read your code, every time you see 'spin' you need to think "right, that actually just means matrix". If you just use a single name, you'll save yourself a lot of unnecessary thinking, freeing up your brain capacity to understand the code you're writing/debugging/reading/whatever. If spin better describes the values in the matrix, then go ahead and rename your matrix variable to spin (it's a simple search-and-replace). But don't use different names for the same thing unless you want to make your code harder to understand.
I agree - that's why I said in my post #10 that the easiest way would be to do text-replace. I only offered the #define as an option to try to get the code posted by the OP to compile as I suspect that the part of the code using spin() was obtained elsewhere and I not sure of the expertise of the OP based upon the postings.