Coding Style(Cont) )救中国研究院 Use all uppercase with underscores for macro define MY MACRO NUMBER 100 Declare all your variables at the start of function Avoid hard coding constant. Use enum or macro define MY MAX LENGTH 1024 User braces for one line code 工E(mf工 nitia1ized) hr = S OK; Limit the length of a single function9 Coding Style (Cont.) • Use all uppercase with underscores for macro. #define MY_MACRO_NUMBER 100 • Declare all your variables at the start of function. • Avoid hard coding constant. Use enum or macro. #define MY_MAX_LENGTH 1024 • User braces for one line code If (m_fInitialized) { hr = S_OK; } • Limit the length of a single function