Home Segments Index Top Previous Next

460: Sidetrip

You may, if you wish, use macros to simplify expressions involving unions, structures, and structure variables. For example, suppose you define the macro PE_RATIO as follows:

#define PE_RATIO stock.pe_ratio 

Then, you can replace the expression trade_union.stock.pe_ratio by an arguably simpler expression, trade_union.PE_RATIO.