Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: mvcalypso on April 27, 2009, 01:42:34 PM
-
Hi,
I'm started to write some more macros and triggered my strong dislike for magic numbers in source code.
I'd just as soon use a set of names that are already in common use rather than invent names.
I think I remember seeing a post with a reference to a header file that defines names for all the mach DROS, LEDs etc. - but dang if I can find it now...
Is there a header file which is already in comon usage?
Can someone point me to such a critter?
Dave
-
I do not know of one. There was a recent list of all the DROs posted, but its only a list with descriptive names, not useable variable names
-
Wow, that surprises me. :o
OK, I guess I'll roll my own list of constants to use in macros.
Thanks for the response.
Dave
-
When you finish naming , please post the results here, at least there will be 2 people with same code names !
-
When you finish naming , please post the results here, at least there will be 2 people with same code names !
Hi,
the best source of "already typed in" magic numbers I have found is at
http://www.machsupport.com/forum/index.php/topic,6657.0.html
I have decided to give up on making a master header that defines all the constants. The reason is that the full set of defined constants is so long that it annoys me to have to skip over it before I can see the actual code I am working on. Instead, for my personal macros, I'm using the names from the XLS sheet referenced above, and just including the ones I am using.
Dave