Home Segments Index Top Previous Next

430: Mainline

In principle, you could replace industry-encoding integers with macros. Then, you would need only to maintain the correct correspondence between the industry codes and the corresponding industries in just one place. Elsewhere, you have the mnemonic power of the macro's name working for you.

For example, you could define macros as follows near the beginning of your program:

#define FOOD                    0 
#define TRUCKING                1 
#define COMPUTERS               2 
#define METALS                  3 
#define HEALTH                  4 
#define AIRLINE                 5