已閱讀5頁(yè),還剩7頁(yè)未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
ComputerProgram1IntroductionComputerProgram,setofinstructionsthatdirectsacomputertoperformsomeprocessingfunctionorcombinationoffunctions.Fortheinstructionstobecarriedout,acomputermustexecuteaprogram,thatis,thecomputerreadstheprogram,andthenfollowthestepsencodedintheprograminapreciseorderuntilcompletion.Aprogramcanbeexecutedmanydifferenttimes,witheachexecutionyieldingapotentiallydifferentresultdependingupontheoptionsanddatathattheusergivesthecomputer.Programsfallintotwomajorclasses:applicationprogramsandoperatingsystems.Anapplicationprogramisonethatcarriesoutsomefunctiondirectlyforauser,suchaswordprocessingorgame-playing.Anoperatingsystemisaprogramthatmanagesthecomputerandthevariousresourcesanddevicesconnectedtoit,suchasRAM,harddrives,monitors,keyboards,printers,andmodems,sothattheymaybeusedbyotherprograms.ExamplesofoperatingsystemsareDOS,Windows95,OS2,andUNIX.2ProgramDevelopmentSoftwaredesignerscreatenewprogramsbyusingspecialapplicationsprograms,oftencalledutilityprogramsordevelopmentprograms.Aprogrammerusesanothertypeofprogramcalledatexteditortowritethenewprograminaspecialnotationcalledaprogramminglanguage.Withthetexteditor,theprogrammercreatesatextfile,whichisanorderedlistofinstructions,alsocalledtheprogramsourcefile.Theindividualinstructionsthatmakeuptheprogramsourcefilearecalledsourcecode.Atthispoint,aspecialapplicationsprogramtranslatesthesourcecodeintomachinelanguage,orobjectcodeaformatthattheoperatingsystemwillrecognizeasaproperprogramandbeabletoexecute.Threetypesofapplicationsprogramstranslatefromsourcecodetoobjectcode:compilers,interpreters,andassemblers.Thethreeoperatedifferentlyandondifferenttypesofprogramminglanguages,buttheyservethesamepurposeoftranslatingfromaprogramminglanguageintomachinelanguage.Acompilertranslatestextfileswritteninahigh-levelprogramminglanguage-suchasFORTRAN,C,orPascalfromthesourcecodetotheobjectcodeallatonce.ThisdiffersfromtheapproachtakenbyinterpretedlanguagessuchasBASIC,APLandLISP,inwhichaprogramistranslatedintoobjectcodestatementbystatementaseachinstructionisexecuted.Theadvantagetointerpretedlanguagesisthattheycanbeginexecutingtheprogramimmediatelyinsteadofhavingtowaitforallofthesourcecodetobecompiled.Changescanalsobemadetotheprogramfairlyquicklywithouthavingtowaitforittobecompiledagain.Thedisadvantageofinterpretedlanguagesisthattheyareslowtoexecute,sincetheentireprogrammustbetranslatedoneinstructionatatime,eachtimetheprogramisrun.Ontheotherhand,compiledlanguagesarecompiledonlyonceandthuscanbeexecutedbythecomputermuchmorequicklythaninterpretedlanguages.Forthisreason,compiledlanguagesaremorecommonandarealmostalwaysusedinprofessionalandscientificapplications.Anothertypeoftranslatoristheassembler,whichisusedforprogramsorpartsofprogramswritteninassemblylanguage.Assemblylanguageisanotherprogramminglanguage,butitismuchmoresimilartomachinelanguagethanothertypesofhigh-levellanguages.Inassemblylanguage,asinglestatementcanusuallybetranslatedintoasingleinstructionofmachinelanguage.Today,assemblylanguageisrarelyusedtowriteanentireprogram,butisinsteadmostoftenusedwhentheprogrammerneedstodirectlycontrolsomeaspectofthecomputersfunction.Programsareoftenwrittenasasetofsmallerpieces,witheachpiecerepresentingsomeaspectoftheoverallapplicationprogram.Aftereachpiecehasbeencompiledseparately,aprogramcalledalinkercombinesallofthetranslatedpiecesintoasingleexecutableprogram.Programsseldomworkcorrectlythefirsttime,soaprogramcalledadebuggerisoftenusedtohelpfindproblemscalledbugs.Debuggingprogramsusuallydetectaneventintheexecutingprogramandpointtheprogrammerbacktotheoriginoftheeventintheprogramcode.Recentprogrammingsystems,suchasJava,useacombinationofapproachestocreateandexecuteprograms.AcompilertakesaJavasourceprogramandtranslatesitintoanintermediateform.SuchintermediateprogramsarethentransferredovertheInternetintocomputerswhereaninterpreterprogramthenexecutestheintermediateformasanapplicationprogram.3ProgramElementsMostprogramsarebuiltfromjustafewkindsofstepsthatarerepeatedmanytimesindifferentcontextsandindif
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025~2026學(xué)年吉林省吉林市昌邑區(qū)校聯(lián)考統(tǒng)編版八年級(jí)上學(xué)期期中考試歷史試卷
- 策劃知識(shí)類活動(dòng)方案(3篇)
- 山東省德州市2025-2026學(xué)年高三上學(xué)期11月期中考試政治試題(解析版)
- 湖南省長(zhǎng)沙市望城區(qū)2025-2026學(xué)年高一上學(xué)期期中考試政治試題(解析版)
- 保險(xiǎn)保障咨詢服務(wù)條款合同條款協(xié)議2026年協(xié)議
- 2026年一級(jí)注冊(cè)建筑師之建筑設(shè)計(jì)考試題庫(kù)500道附答案【突破訓(xùn)練】
- 2026年國(guó)家電網(wǎng)招聘之公共與行業(yè)知識(shí)考試題庫(kù)500道附完整答案(歷年真題)
- 2026年國(guó)家電網(wǎng)招聘之文學(xué)哲學(xué)類考試題庫(kù)300道含答案(綜合卷)
- 2026年一級(jí)建造師之一建鐵路工程實(shí)務(wù)考試題庫(kù)300道含完整答案【各地真題】
- 2026年一級(jí)建造師之一建水利水電工程實(shí)務(wù)考試題庫(kù)500道帶答案(綜合卷)
- 2025年荊楚理工學(xué)院馬克思主義基本原理概論期末考試真題匯編
- 貴港市利恒投資集團(tuán)有限公司關(guān)于公開招聘工作人員備考題庫(kù)附答案
- 廣東省部分學(xué)校2025-2026學(xué)年高三上學(xué)期9月質(zhì)量檢測(cè)化學(xué)試題
- 【道 法】期末綜合復(fù)習(xí) 課件-2025-2026學(xué)年統(tǒng)編版道德與法治七年級(jí)上冊(cè)
- 中國(guó)心力衰竭診斷和治療指南2024解讀
- 冬季防靜電安全注意事項(xiàng)
- 2025年國(guó)家工作人員學(xué)法用法考試題庫(kù)(含答案)
- 祠堂修建合同范本
- 400MWh獨(dú)立儲(chǔ)能電站項(xiàng)目竣工驗(yàn)收?qǐng)?bào)告
- 高處作業(yè)吊籃安裝、拆卸、使用技術(shù)規(guī)程(2025版)
- 奢侈品庫(kù)房管理
評(píng)論
0/150
提交評(píng)論