computer programming language | Types & Examples

文章推薦指數: 80 %
投票人數:10人

computer programming language, any of various languages for expressing a set of detailed instructions for a digital computer. Such instructions can be ... computerprogramminglanguage TableofContents computerprogramminglanguage IntroductionLanguagetypesMachineandassemblylanguagesAlgorithmiclanguagesFORTRANALGOLCBusiness-orientedlanguagesCOBOLSQLEducation-orientedlanguagesBASICPascalLogoHypertalkObject-orientedlanguagesC++C#AdaJavaVisualBasicPythonDeclarativelanguagesScriptinglanguagesDocumentformattinglanguagesTeXPostScriptSGMLWorldWideWebdisplaylanguagesHTMLXMLWebscriptingElementsofprogrammingControlstructuresDatastructures FastFacts 2-MinSummary RelatedContent Quizzes Media Videos More MoreArticlesOnThisTopic AdditionalReading Contributors ArticleHistory Home Technology Computers computerprogramminglanguage Actions Cite verifiedCite Whileeveryefforthasbeenmadetofollowcitationstylerules,theremaybesomediscrepancies. Pleaserefertotheappropriatestylemanualorothersourcesifyouhaveanyquestions. SelectCitationStyle MLA APA ChicagoManualofStyle CopyCitation Share Share Sharetosocialmedia Facebook Twitter URL https://www.britannica.com/technology/computer-programming-language GiveFeedback ExternalWebsites Feedback Corrections?Updates?Omissions?Letusknowifyouhavesuggestionstoimprovethisarticle(requireslogin). FeedbackType Selectatype(Required) FactualCorrection Spelling/GrammarCorrection LinkCorrection AdditionalInformation Other YourFeedback SubmitFeedback Thankyouforyourfeedback Oureditorswillreviewwhatyou’vesubmittedanddeterminewhethertorevisethearticle. JoinBritannica'sPublishingPartnerProgramandourcommunityofexpertstogainaglobalaudienceforyourwork! ExternalWebsites ComputerHope-ProgrammingLanguage Print print Print Pleaseselectwhichsectionsyouwouldliketoprint: TableOfContents Cite verifiedCite Whileeveryefforthasbeenmadetofollowcitationstylerules,theremaybesomediscrepancies. Pleaserefertotheappropriatestylemanualorothersourcesifyouhaveanyquestions. SelectCitationStyle MLA APA ChicagoManualofStyle CopyCitation Share Share Sharetosocialmedia Facebook Twitter URL https://www.britannica.com/technology/computer-programming-language Feedback ExternalWebsites Feedback Corrections?Updates?Omissions?Letusknowifyouhavesuggestionstoimprovethisarticle(requireslogin). FeedbackType Selectatype(Required) FactualCorrection Spelling/GrammarCorrection LinkCorrection AdditionalInformation Other YourFeedback SubmitFeedback Thankyouforyourfeedback Oureditorswillreviewwhatyou’vesubmittedanddeterminewhethertorevisethearticle. JoinBritannica'sPublishingPartnerProgramandourcommunityofexpertstogainaglobalaudienceforyourwork! ExternalWebsites ComputerHope-ProgrammingLanguage By DavidHemmendinger • EditHistory TableofContents KeyPeople: StephenWolfram NiklausEmilWirth KristenNygaard JohnWarnerBackus AlanKay ...(Showmore) RelatedTopics: artificialintelligenceprogramminglanguage Webscript Perl Java C ...(Showmore) Seeallrelatedcontent→ Summary Readabriefsummaryofthistopic computerprogramminglanguage,anyofvariouslanguagesforexpressingasetofdetailedinstructionsforadigitalcomputer.Suchinstructionscanbeexecuteddirectlywhentheyareinthecomputermanufacturer-specificnumericalformknownasmachinelanguage,afterasimplesubstitutionprocesswhenexpressedinacorrespondingassemblylanguage,oraftertranslationfromsome“higher-level”language.Althoughtherearemanycomputerlanguages,relativelyfewarewidelyused.Machineandassemblylanguagesare“low-level,”requiringaprogrammertomanageexplicitlyallofacomputer’sidiosyncraticfeaturesofdatastorageandoperation.Incontrast,high-levellanguagesshieldaprogrammerfromworryingaboutsuchconsiderationsandprovideanotationthatismoreeasilywrittenandreadbyprogrammers. BritannicaQuiz ComputersandTechnologyQuiz ComputershostwebsitescomposedofHTMLandsendtextmessagesassimpleas...LOL.Hackintothisquizandletsometechnologytallyyourscoreandrevealthecontentstoyou. LanguagetypesMachineandassemblylanguagesAmachinelanguageconsistsofthenumericcodesfortheoperationsthataparticularcomputercanexecutedirectly.Thecodesarestringsof0sand1s,orbinarydigits(“bits”),whicharefrequentlyconvertedbothfromandtohexadecimal(base16)forhumanviewingandmodification.Machinelanguageinstructionstypicallyusesomebitstorepresentoperations,suchasaddition,andsometorepresentoperands,orperhapsthelocationofthenextinstruction.Machinelanguageisdifficulttoreadandwrite,sinceitdoesnotresembleconventionalmathematicalnotationorhumanlanguage,anditscodesvaryfromcomputertocomputer.Assemblylanguageisonelevelabovemachinelanguage.Itusesshortmnemoniccodesforinstructionsandallowstheprogrammertointroducenamesforblocksofmemorythatholddata.Onemightthuswrite“addpay,total”insteadof“0110101100101000”foraninstructionthataddstwonumbers. GetaBritannicaPremiumsubscriptionandgainaccesstoexclusivecontent. SubscribeNow Assemblylanguageisdesignedtobeeasilytranslatedintomachinelanguage.Althoughblocksofdatamaybereferredtobynameinsteadofbytheirmachineaddresses,assemblylanguagedoesnotprovidemoresophisticatedmeansoforganizingcomplexinformation.Likemachinelanguage,assemblylanguagerequiresdetailedknowledgeofinternalcomputerarchitecture.Itisusefulwhensuchdetailsareimportant,asinprogrammingacomputertointeractwithperipheraldevices(printers,scanners,storagedevices,andsoforth).AlgorithmiclanguagesAlgorithmiclanguagesaredesignedtoexpressmathematicalorsymboliccomputations.Theycanexpressalgebraicoperationsinnotationsimilartomathematicsandallowtheuseofsubprogramsthatpackagecommonlyusedoperationsforreuse.Theywerethefirsthigh-levellanguages.FORTRANThefirstimportantalgorithmiclanguagewasFORTRAN(formulatranslation),designedin1957byanIBMteamledbyJohnBackus.Itwasintendedforscientificcomputationswithrealnumbersandcollectionsofthemorganizedasone-ormultidimensionalarrays.ItscontrolstructuresincludedconditionalIFstatements,repetitiveloops(so-calledDOloops),andaGOTOstatementthatallowednonsequentialexecutionofprogramcode.FORTRANmadeitconvenienttohavesubprogramsforcommonmathematicaloperations,andbuiltlibrariesofthem.FORTRANwasalsodesignedtotranslateintoefficientmachinelanguage.Itwasimmediatelysuccessfulandcontinuestoevolve.ALGOLALGOL(algorithmiclanguage)wasdesignedbyacommitteeofAmericanandEuropeancomputerscientistsduring1958–60forpublishingalgorithms,aswellasfordoingcomputations.LikeLISP(describedinthenextsection),ALGOLhadrecursivesubprograms—proceduresthatcouldinvokethemselvestosolveaproblembyreducingittoasmallerproblemofthesamekind.ALGOLintroducedblockstructure,inwhichaprogramiscomposedofblocksthatmightcontainbothdataandinstructionsandhavethesamestructureasanentireprogram.Blockstructurebecameapowerfultoolforbuildinglargeprogramsoutofsmallcomponents.ALGOLcontributedanotationfordescribingthestructureofaprogramminglanguage,Backus–NaurForm,whichinsomevariationbecamethestandardtoolforstatingthesyntax(grammar)ofprogramminglanguages.ALGOLwaswidelyusedinEurope,andformanyyearsitremainedthelanguageinwhichcomputeralgorithmswerepublished.Manyimportantlanguages,suchasPascalandAda(bothdescribedlater),areitsdescendants.CTheCprogramminglanguagewasdevelopedin1972byDennisRitchieandBrianKernighanattheAT&TCorporationforprogrammingcomputeroperatingsystems.ItscapacitytostructuredataandprogramsthroughthecompositionofsmallerunitsiscomparabletothatofALGOL.Itusesacompactnotationandprovidestheprogrammerwiththeabilitytooperatewiththeaddressesofdataaswellaswiththeirvalues.Thisabilityisimportantinsystemsprogramming,andCshareswithassemblylanguagethepowertoexploitallthefeaturesofacomputer’sinternalarchitecture.C,alongwithitsdescendantC++,remainsoneofthemostcommonlanguages.Business-orientedlanguagesCOBOLCOBOL(commonbusinessorientedlanguage)hasbeenheavilyusedbybusinessessinceitsinceptionin1959.AcommitteeofcomputermanufacturersandusersandU.S.governmentorganizationsestablishedCODASYL(CommitteeonDataSystemsandLanguages)todevelopandoverseethelanguagestandardinordertoensureitsportabilityacrossdiversesystems. NewfromBritannica Theworld’smostremoteplace,farfromhumanhabitation,isPointNemointhePacificOcean—andthat’swherelarge“spacejunk”isdeliberatelysenttocrashwhenitreentersEarth’satmosphere. SeeAllGoodFacts COBOLusesanEnglish-likenotation—novelwhenintroduced.Businesscomputationsorganizeandmanipulatelargequantitiesofdata,andCOBOLintroducedtherecorddatastructureforsuchtasks.Arecordclustersheterogeneousdata—suchasaname,anIDnumber,anage,andanaddress—intoasingleunit.Thiscontrastswithscientificlanguages,inwhichhomogeneousarraysofnumbersarecommon.Recordsareanimportantexampleof“chunking”dataintoasingleobject,andtheyappearinnearlyallmodernlanguages.



請為這篇文章評分?