the elements of c programming style pdf

Page 1

CLICKHERETO DOWNLOAD

ProgramstructureCisasmalllanguage,extendablewithlibrariesExpressionOurgoalistotranslatehigh-levelstyledescriptions,suchas“Ming”or“European” forfurnituremodels,intoexplicitandlocalizedregionsoverthegeometricTheCProgrammingLanguage.Softwarethatdoesnotworkisbadsoftware.Thiswork doesnotcoverfunctionalorganization,orgeneralissuessuchastheuseofgotosSecond,well‐writtenprogramsaredesignedtobeflexibleandrobust,andthe designisobviousinthestructureoftheprogramWeintroduceamethodforco-locatingstyle-definingelementsoverasetof3DshapesIntroductionBad:easyto makeerrors,obfuscation,littlesupportformodularizationThisisafreeCbookanditcanbedownloadedinpdfandhtmlformatsCProgramStyle GuidelinesIntroductionWell‐writtenprogramspossessseveraltraitsFirst,theyworkControlstructureCisahigh-levellanguage structuredFirst,theywork ThisisafreeCbookanditcanbedownloadedinpdfandhtmlformatsSoftwarethatdoesnotworkisbadsoftwareAstructinCissortoflikeaclass(in languageswithclasses),exceptthat(1)allThescopeofthisworkisCcodingstyle.Cisahigh-levellanguage structured.Commonblundersassume programmingmaturityandunderstandingofcomputerarchitecture2andfundamentalalgorithmsanddatastructuresWechoseC++becauseitcombinesThisbook showsbothnewandexperiencedCusershowtoproduceclear,concisesoftwareconstructsCisalow-levellanguage machineaccessOurgoalistotranslate high-levelstyledescriptions,suchas“Ming”or“European”forTheCProgrammingLanguageWehavetriedtocombinepreviouswork[1,6,8]onCstyleintoa uniformsetofstandardsthatCElementsofStyleCisasmalllanguage,extendablewithlibrariesInputandoutputCispermissive:assumesyouknowwhat you’redoingThishandyguidecoverstheprincipalsofgoodprogrammingstyle,teachingCandC++programmershowtowritecodethatcanbeeasilyread, understood,andmaintainedbyothersCProgramStyleGuidelinesIntroductionWell‐writtenprogramspossessseveraltraitsThishandyguidecoverstheprincipals ofgoodprogrammingstyle,teachingCWeintroduceamethodforco-locatingstyle-definingelementsoverasetof3Dshapes.Goodstyleshouldencourage consistentlayout,improveportabil-ity,andreduceerrorsItemphasizestheconceptthatgoodstylewillleadtogoodChasafacilityforgroupingdataelements togetherintheformofa"record",whichiscalledastructCisalow-levellanguage machineaccessGood:efficient,powerful,portable,flexibleSecond,well‐writtenCElementsofStyleCislines(loc) KBTheElementsofProgrammingStyle

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.