Ib hom lus uas siv zog heev txhais li cas?
Ib hom lus uas siv zog heev txhais li cas?

Video: Ib hom lus uas siv zog heev txhais li cas?

Video: Ib hom lus uas siv zog heev txhais li cas?
Video: kuv yog neeg nplog ຊົນເຜົ່າມົ່ງ lus suav hais li cas? 2024, Kaum ib hlis
Anonim

A muaj zog - ntaus ntawv programming lus yog ib qho uas txhua tus hom ntawm cov ntaub ntawv (xws li tus lej, cim, hexadecimal, packed decimal, thiab lwm yam) yog predefined raws li ib feem ntawm lub programming lus thiab tag nrho cov tsis tu ncua lossis qhov sib txawv uas tau teev tseg rau ib qho kev pab cuam yuav tsum tau piav qhia nrog ib qho ntawm cov ntaub ntawv hom.

Ua li no, nws txhais li cas rau ib hom lus kom ntaus statically ntaus dab tsi tiv thaiv C los ntawm kev ntaus ntawv?

Ntaus ntaus : cov lus uas yuav tsum tau txhua yam khoom muaj hom. Statically ntaus ntawv : cov lus yog tias nws ua hom kev kuaj xyuas ntawm lub sijhawm sib sau ua ke tsis yog lub sijhawm ua haujlwm. Hauv statically ntaus hom lus , qhov yuam kev yuav muab pov rau ntawm lub sijhawm sau tsis yog lub sijhawm khiav.

Tsis tas li ntawd, Python puas yog ib hom lus uas muaj zog heev? Python yog dynamically- yam lus . Java yog statically- yam lus . Nyob rau hauv ib tug weakly yam lus , variables yuav implicitly coerced rau unrelated hom, whereas nyob rau hauv a hom lus zoo heev lawv ua tsis tau, thiab yuav tsum tau hloov dua siab tshiab. Ob leeg Java thiab Python yog hom lus tau zoo heev.

Hais txog qhov no, dab tsi yog hom lus uas muaj zog thiab ntaus yam tsis muaj zog?

Lub ntsiab sib txawv, kwv yees hais lus, ntawm a hom lus zoo heev thiab a tsis muaj zog ntaus ntawv ib ni a tsis muaj zog ntaus ntawv ib qho ua rau kev hloov pauv ntawm cov hom tsis sib xws implicitly, thaum a ntaus ntawv heev ib qho feem ntau tsis tso cai rau kev hloov pauv tsis raug ntawm cov hom tsis sib xws.

Puas yog C muaj zog lossis tsis muaj zog ntaus ntawv?

C yog statically ntaus ntawv lus uas txhais tau hais tias txhua qhov sib txawv hom yog txiav txim siab ntawm compile lub sij hawm thiab tsis run-time xws li Python los yog JavaScript. Yog li ntawd, kom sum nws li static, tsis muaj zog ntaus ntawv lus. C yog ncaj ncees ntaus ntawv heev.

Pom zoo: