Dab tsi yog qhov txawv ntawm cov ntaub ntawv hom thiab qhov sib txawv?
Dab tsi yog qhov txawv ntawm cov ntaub ntawv hom thiab qhov sib txawv?

Video: Dab tsi yog qhov txawv ntawm cov ntaub ntawv hom thiab qhov sib txawv?

Video: Dab tsi yog qhov txawv ntawm cov ntaub ntawv hom thiab qhov sib txawv?
Video: Qhia txhais 50 zaj npau suav tias yog dab tsi part 3 15 Sep 2019 2024, Hlis ntuj nqeg
Anonim

A sib txawv yuav tsum muaj ib hom ntaub ntawv txuam nrog nws, piv txwv li nws tuaj yeem muaj hom ntaub ntawv likeinteger, decimal tooj, cim thiab lwm yam sib txawv ntawm hom Integer khaws cov lej suav thiab tus cwj pwm typevariable khaws cov cim tus nqi. Qhov tseem ceeb sib txawv ntawm ntau yam hom ntaub ntawv yog lawv qhov loj me me.

Ib yam li ntawd ib tug yuav nug, dab tsi yog cov ntaub ntawv hom thiab sib txawv?

A sib txawv tuaj yeem xav tias yog qhov chaw nco uas tuaj yeem tuav qhov tseem ceeb ntawm qhov tshwj xeeb hom . Piv txwv li, a sib txawv uas tuav cov hlua ntawv muaj cov hom ntaub ntawv Txoj hlua thiab hu ua hlua sib txawv . A sib txawv uas tuav integers (tag nrho cov lej) muaj cov hom ntaub ntawv Integer thiab hu ua integer sib txawv.

Kuj Paub, dab tsi yog hom sib txawv? Hauv hom theory thiab programming languages, a hom hloov pauv yog lej sib txawv ntau tshaj hom . Txawm nyob rau hauv cov lus programming uas tso cai rau mutable sib txawv , a hom hloov pauv tseem yog ib qho abstraction, nyob rau hauv qhov kev nkag siab tias nws tsis sib xws rau qee qhov chaw nco.,qha a hom hloov pauv.

Ib yam li ntawd, tib neeg nug, qhov txawv ntawm cov ntaub ntawv thiab qhov sib txawv yog dab tsi?

A sib txawv yog tej yam ntxwv, tus naj npawb, orquantity uas yuav ntsuas los yog suav. A sib txawv kuj hu ua a cov ntaub ntawv yam khoom. Nws yog hu ua a sib txawv vim tus nqi yuav txawv nruab nrab ntawm cov ntaub ntawv units hauv a cov pej xeem, thiab tej zaum yuav hloov tus nqi raws sij hawm.

Dab tsi yog cov ntaub ntawv sib txawv A qhov sib txawv tuaj yeem muaj?

Feem ntau cov lus programming txhawb hom ntaub ntawv ofreal, integer thiab boolean. A hom ntaub ntawv constrains tus valueshat ib qho kev qhia, xws li a sib txawv los yog muaj nuj nqi, tej zaum coj.

Hom ntaub ntawv uas muaj xws li:

  • tus lej.
  • cov booleans.
  • cov cim.
  • floating point tooj.
  • alphanumeric cov hlua.

Pom zoo: