Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 11:18:18 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  VB defines/header file?
Pages: 1   Go Down
Print
Author Topic: VB defines/header file?  (Read 1040 times)
0 Members and 2 Guests are viewing this topic.
mvcalypso
V4 Screen Contributor

Offline Offline

Posts: 48


View Profile
« on: April 27, 2009, 12: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
 
Logged
Ron Ginger
V4 Screen Contributor

Offline Offline

Posts: 568



View Profile WWW
« Reply #1 on: April 28, 2009, 05:52:08 PM »

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
Logged
mvcalypso
V4 Screen Contributor

Offline Offline

Posts: 48


View Profile
« Reply #2 on: April 28, 2009, 07:00:36 PM »

Wow, that surprises me.  Shocked 
OK, I guess I'll roll my own list of constants to use in macros.
Thanks for the response.
Dave
Logged
RadiantHeat
Active Member

Offline Offline

Posts: 30


View Profile
« Reply #3 on: April 30, 2009, 09:09:13 AM »

When you finish naming , please post the results here, at least there will be 2 people with same code names !
Logged
mvcalypso
V4 Screen Contributor

Offline Offline

Posts: 48


View Profile
« Reply #4 on: May 04, 2009, 11:20:48 AM »

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
 
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!