Vim Li Cas Program Poob

Vim Li Cas Program Poob
Vim Li Cas Program Poob

Video: Vim Li Cas Program Poob

Video: Vim Li Cas Program Poob
Video: Vim li cas muag khoom tsi poob? 2024, Hlis ntuj nqeg
Anonim

Qhov ntau yam ntawm cov dej num daws hnub no nrog kev pab ntawm tus kheej lub khoos phis tawm tau muab los ntawm lub neej ntawm ib pawg loj ntawm cov kev thov. Qhov yooj yim ntawm kev ua haujlwm nrog lub software feem ntau nyob ntawm nws txoj kev ntseeg tau, uas tau hais tawm thaum tsis muaj xwm txheej ceev. Txawm li cas los xij, ntau qhov kev zov me nyuam poob thaum lub sijhawm tsis sib haum xeeb feem ntau. Vim li cas?

Vim li cas
Vim li cas

Lub tshuab zam tsuas yog siv los taug thiab tswj tshwj xeeb, tsis meej lossis yuam kev uas tshwm sim thaum lub sijhawm ua haujlwm ntawm cov koos pij tawj nyob rau hauv kev tswj ntawm cov kev ua haujlwm niaj hnub no. Cov kev zam tsis tuaj yeem yog kho vajtse (pov los ntawm tus tsim) thiab software (pov tseg los ntawm daim ntawv thov nws tus kheej lossis qee qhov plug-in sab nraud).

Txawm hais tias hom twg, qhov kev zam tuaj yeem ntes thiab ua kom raug. Uncaught zam tshwj xeeb mus rau lub cag runtime lub tsev qiv ntawv saib xyuas lossis qhov operating system-ntsia handler. Yog tias qhov no tshwm sim, qhov kev zov me nyuam sib tsoo nrog cov xov lossis qhov txawv txav haujlwm ntawm lub qhov rais (hauv Windows). Yog hais tias lub tshuab ua haujlwm thev naus laus zis tsis ua haujlwm (piv txwv, nws tau raug tshem tawm), qhov program "twj ywm ntsiag to". Yog li, cov kev zov me nyuam poob vim muaj kev zam uas tsis tuaj yeem tuav tau. Cov laj thawj rau qhov tshwm sim ntawm kev zam yog txawv.

Hauv feem ntau ntawm ntau tus neeg mob, cov kev pab cuam sib tsoo vim qhov kev tua ntawm lawv tus kheej code uas muaj qhov qhia tau meej heev lossis cuam tshuam txog kev siv yuam kev. Cov npe ntawm cov teeb meem tsim kev kub ntxhov yog ntev heev. Cov no yog ob qho tib si yuam kev ntawm kev ua haujlwm ntawm cov lej ntab (piv txwv, faib los ntawm 0), thiab yuam kev ntawm kev ua haujlwm nrog lub cim xeeb (nyeem ntawv lossis sau ntawv sab nraud qhov chaw nyob, nkag mus rau cov nplooj ntawv tiv thaiv, sau ntawv rau qhov chaw nyeem ntawv nco tsuas), txeej tshooj vim tsis paub tseeb recursion, thiab lwm yam. Hauv cov xwm txheej no, cov kev zam ntawm cov cuab yeej lossis lub luag haujlwm kev ua haujlwm raug pov tseg.

Cov ntsiab lus yuam kev suav nrog cov ntau yam ntawm kev tsis txaus lim ntawm cov ntaub ntawv nkag, tsis muaj qhov pom tseeb ntawm cov pointer muaj nuj nqis, thiab ntau ntxiv. Qhov kev tsis txaus ntseeg no ua rau muaj qhov xwm txheej tshwj xeeb tsuas yog qee kis.

Qhov yuam kev siv kuj tuaj yeem pom nyob rau hauv cov khoom siv sab nraud siv los ntawm daim ntawv thov. Piv txwv, hauv cov tsev qiv ntawv muaj zog uas muab cov haujlwm tsim nyog lossis ntxiv rau ntawm cov qauv. Program code uas yog implicitly loaded mus rau qhov chaw nyob ntawm ib tug txheej txheem (piv txwv, nyob rau hauv kev txiav txim siab rau qee cov haujlwm API) tseem tuaj yeem ua rau lub program poob.

Ntau lub ntsej muag thiab cov tsev qiv ntawv nyeem (piv txwv li ADO ntawm Windows) siv cov programmatic kos mechanism yog qhov muaj feem thib ceeb toom kev ua yuam kev. Qhov tsis tuaj lossis tsis ua tiav ntawm kev zam ntawm kev zam los ntawm daim ntawv thov no tuaj yeem ua rau nws poob qis txawm tias qhov xwm txheej tsis muaj teeb meem (xws li poob txuas nrog lub hauv paus).

Pom zoo: