Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.3 KiB

  1. <HTML>
  2. <HEAD>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
  4. <META NAME="Generator" CONTENT="Microsoft Word 97">
  5. <TITLE>Coding Style Guidelines</TITLE>
  6. </HEAD>
  7. <BODY>
  8. <B><I><FONT FACE="Arial"><P>Coding Style Guidelines</P>
  9. </FONT><FONT FACE="Arial" SIZE=2>
  10. <P>&nbsp;</P>
  11. <OL>
  12. </I><LI>Don�t use tabs</LI>
  13. </B><P>Use a 4-space indent instead. Before you start writing code, make sure you enable your editor�s &quot;map tabs to spaces&quot; feature. In MSDEV, you can find this option by clicking &quot;tools&quot;=&gt;&quot;options&quot;=&gt;&quot;tabs.&quot;</P>
  14. <B><LI>Don�t use standard C runtime library functions</LI>
  15. </B><P>We�ve got internal API�s for everything. So if you�re about to type &quot;strcmp&quot; ask your mentor or someone else what to use instead. </P>
  16. <B><LI>Use Hungarian prefix notation when naming variables</LI>
  17. </B><P>Any Windows programming book (e.g. Petzold�s <U>Programming Windows 95</U>) should have a discussion of this naming convention. Or you can just look around in the IE code base for examples.</P>
  18. <B><LI>Miscellaneous</LI>
  19. </B><P>Put a space between &quot;if&quot; and &quot;(&quot;. Put a space between &quot;switch&quot; and &quot;(&quot;. Don�t put a space between &quot;foo&quot; and &quot;(&quot;.</P></FONT></BODY>
  20. </OL>
  21. </HTML>