全文预览

谷歌C编码规范

上传者:苏堤漫步 |  格式:pdf  |  页数:66 |  大小:9432KB

文档介绍
NSISTENT.\rIfyouareeditingcode,takeafewminutestolookatthecodearoundyouanddetermineits\rstyle.Iftheyusespacesaroundtheirifclauses,youshould,too.Iftheircommentshavelittle\rboxesofstarsaroundthem,makeyourcommentshavelittleboxesofstarsaroundthemtoo.\rThepointofhavingstyleguidelinesistohaveacommonvocabularyofcodingsopeoplecan\rconcentrateonwhatyouaresaying,ratherthanonhowyouaresayingit.Wepresentglobal\rstylerulesheresopeopleknowthevocabulary.Butlocalstyleisalsoimportant.Ifcodeyou\raddtoafilelooksdrasticallydifferentfromtheexistingcodearoundit,thediscontinuitythrows\rreadersoutoftheirrhythmwhentheygotoreadit.Trytoavoidthis.\rOK,enoughwritingaboutwritingcode;thecodeitselfismuchmoreinteresting.Havefun!\rRevision3.180\rBenjyWeinberger\rCraigSilverstein\rGregoryEitzmann\rMarkMentovai\rTashanaLandray

收藏

分享

举报
下载此文档