Maintaining Constants

Maintaining Constants

I like to use the Constant.txt file Microsoft has been kind enoughto provide. For a new project, copy Constant.txt to a new filesuch as MyConst.txt. Place MyConst.txt in the same directory asthe MAK file and then include MyConst.txt in the project. In debugmode open MyConst.txt and do a FIND on the string Global and replacewith ‘Global. MyConst.txt is changed to a large comment file.

When a new constant is required, check MyConst.txt to see if Microsofthas defined it. If it is there, then create it by removing thequote. This keeps all of the Microsoft constants in context andmakes the program easier to maintain.


Share the Post: