The document discusses programming concepts, particularly focusing on variables, their types, and memory management in programming languages. It explains the importance of variable names, binding, and how different data types can influence the operations that can be performed. Additionally, it touches on memory allocation and the significance of understanding variable types for effective programming.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0 ratings0% found this document useful (0 votes)
29 views13 pages
2nd Unit PPL Notes
The document discusses programming concepts, particularly focusing on variables, their types, and memory management in programming languages. It explains the importance of variable names, binding, and how different data types can influence the operations that can be performed. Additionally, it touches on memory allocation and the significance of understanding variable types for effective programming.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 13
ONITA2
woe L let uct
lames 6- progromnmning vguege Wort
nomes alay know denuihiey
the Subprogroma, hbelyy format
+o idannieFy Somettnng ,
Ss are ae yelated +o
parameter 4 and -+hevy
. Sod SES saganyvrt
Progtom ming Constyainds. exp ante wig
‘ - 4
ome. form !- i
Morn : Program ing bra va Ube Care Senach ve VeMmg
wmce tn % ,
ae beguayay Ujce G, C44) Jota eter)
Wor ay - 5
—* Ak ,
Ke 5 F 7 word rs glaally ° progroranneng Drq vege
wor
s Hot hay a Speate ry meontvg undev certo
entext 22 Chay, eshum
EX Saw
baa er “Te 1 bypeder: breac, Conte Ve
a + me Chsosttory dos ory pe. mpve ot ty. Content
beau) -Mosunbles OF oP tae too P. Lo Hous
fot 16 woruable? a Yowoble Ch a talue Hat ondelonge
depending on Conditions or - on information passed So.
The Program. /
yloore! a word 16 & Word of FL tot ia Spectar only
io terrain §=OmtentS. pe ob a
S specion words in pus are axed 40 male prajromg
more readobse by nova acto ~o be pedhermed.
> Thy abo are used to Mporore he Syntace parts oF
Brorements ond — PrOPTOMS?
Rignut ol wood, 1 is chivked trom speube coords,
which moon they cornot be Redebuvred- *f pens.
SIA a speuas word of PL ter an not be und 3
| A nome. Reywed Lords ave better ton tay wore boc,
ee abel 4o yeduune kay toords Con jo Conbuwrg-
| ved goody, me Propnie) tn bofale. é,Om A Norms IN PYM,
— \ooulable J wrible ames are Yhe most common!
ao, Pam Vanble & an abstrackny ef a memory cell “oy:
\ $ Collecton of Celle.
= Programmer & often think oP Wesuable Names 3 Tame
dus tos. EOL ad
oy wee) locavrons, bye ture. 5 much ‘move 40 4 Now
sp tan Jiat a tome.
D(a Pom Mantble 1A an abstraction of o& Qmputer meng
LI. Cell ov lection of cells’) boon)
— >the move trom rachine Avg ayes aa cet bra ay
ky 8 muy one of Rplang dosolute Aumet’C merrore]
Adloruss tor cbta voit rom, making ram's hy more
Ruchble ond thisukye Casey to write ond manta
that AREY Sep alsy Prowided an escape foo the
de:
Plein of manuas absolut @ adeussing , betauye the
Lohr Ya Converted In 6
Also choo tho, Oddy eg
LA Varable Gy be
OH stbureos “Crome, a,
= z
roms to aChuor ed vy
7 ~
Paracteryed as 4 Sexrtuple of
» Vole e fgg, ae St +
[i PeBte the odes of a we ye io he an,
fF Geldness with which & iA agouited, J
4 Pe ogocinston 14 Mot ay Simple abr may rt Fist appevt
L'n rong bogmgs 1S porte for the Some voudbLe
D +o be axouated With different addbuwry at aiFF
tmes in the Program,
[> fhe addres of oo wartoble is Somat my: Calleet SS
[Te wate, becaiye He odds (4 cohort 15 Regmiyed ihr
He name of avariable appearé tn te lobe sncfe oP W
[: gnmeid
\S Hg! pagrse to hou. oncbipale Nariab les Hoe kai
~ ow, altro re:} When moe von ene variable Name De AA MA ACCELA
dhe Gomme memos peetion, the variably ane erllec! aba
16 0 hindrance tb Readabilrty hecape tb allows a
a A lasing
hovged by on au gnment
=
Wrroble to bawe PES NwaluL
4p a different variable,
4 F variable named -lotat and sum ate arcs, any Chorge
de-the valu of seta also chongts He Wale oF Sum end
\ce veréa .
> A Readey of +e program , mus & always Remember Hed +ora
and Sum are different rames for -the seme, memoiy Colby
jasing also males program Ver'f'ccdien More aercale
TYPE?
YPE? she gee of a Uannble determines the Rnge of
Wlues the Varvable Gn Store. and the Set of operations
swt ave defined For valy of +e gre .
Gy int age tyre in Java “spewRes o watue range of
214Z USB6UR ~21UFUSAbqr, md arithmet’c rperarrons soy
dddekion , SubSLrack’on, mulerpl' any) + asucatern ord modulus
Male’ re ake oF a uariable (4 the Contents of the
memory cell ov Cell. aodated with Fhe vaurble ,
convenient to think of _ Gnputer memory in keymy
sepa. ..physieet, Colla.
* rth Wa eedbon
uvaite , OF
P qt is
oP abetract cells, Rod,
or indi videaly addnewable
ave byte -sive, wll
? the physveat cells ,
most Cont Genporavy Computer memories
a byte Uyvaly beng etghe bt in dength «
S The 4i2¢ 16 top galt tor moss program
PAVartablelds vahe lw Sometimes Called tes
wou ables ,
y-Uale
eng nm OR binding %® an ayou'aktory between an attribute
and an entty, such as bin a waouabl. onc Hs type or value,
o bln on operaton and. a Symbol
i
The time at which a binding take, place 1 cated. bindsig in
=~ ~ einaing «bing Him" are prominent Concepts -(n We
a. ce of pegrammug brguagte .
S
take Place ad brguge /
lo tme, me
Seman’
| > atndeng's an
L bypiage. implementasion HME, CoP
rl ln Hime , oF
wm time.
3 Coalr s Count +85
I > the wre oF comb 14 bound at torpile Hime .
> the sel of Pomwowe Malus oF Count bound oe
|\— Compiler dtexign +tme .
[_ > The mooning of —the wpercteon Sy Ul +
Compide tHme, whon the Wy Pas of 145 operonds how
rt been determcned -
[- > -the interno Repesentation oF the Wterar & 4 bowel
L Ak Crop! ber deporte » :
[lO whe uate of Count js bound at exectur en tine wn
4A Statemut -
> 0 determine the “Current Value oF
my ke netewary tp Know when the varia ble say bound
[1]
|] YO Storey ond wrth whith Statement ay. statenwnt's,
ya bound at
ao waroble, Hb
Li Binding of ftir ibuse S +o varvably :-
> ~- binding % stare mp TH Firat ocourd be-bre Run Hime
if
| beging and Reerains unchorged -Heouglouk program exeltthpn
J] > IP the binding 8+ octurs during rap Ame oF BN Chorge "9
i program execukt'on, "tb tA Coble Yromr'e,
the tourhe OF
L qe Bindings |.
° Bebore ao variable can be Rberenced in a Program, tt
[mud be bound toa chta type. *
[> the a 'mP aspettS of tts bindsng are how the ype
gpeertred ond when “he binding toukeoy PUA CEese ype Bmndg :-
15 An explert decbsat’on is 0 Statement
ana Speahies not
na programy
-hy are apart
UStS Wooviable names
yee.
fn Pynpl cid dechnanen tha mens of ayocsou’ Vaoub Ly
with yee sooigh deboult conven ivont’, rattan -llon cleckoaske
Statements ,
> dn WA cae, the SSE appeoronce fla eB ’b Je Pome! yn
8 PROQTAM Constetues (4S ohsuctk Saecbsouron: +”
> Both expert @ implrerr deeBsowvers parle ‘eka birdie
to 4upes - a rib Weel Hise) gent +
2 rota kind of tmplécrt type decboorens wuts Context.
THE 18 SomehiVMUs Called dy pe inset Face :
Nar gon 20; 3 dnt
var AOTAL = 0.0,'-9 Foot
var brome = "Bred" > berry ,
osname Bind The ype oF @ tartabse US not Speer
yi a dethiidithn Starement, ney. a7 vie Fe deterra ined “4
she spabng of tke tome,
,- gnaen te ony j
Storaye @induros ond btehime
The momnory Cell +o which & Varabte
mui be taxon from o. pool of avarabl. memory, hs
1& bound Gomelnld
Procey 15 alued allocat'on »
yg ,
Couto Cok’ 14 apy process of plaung a memury cole. “Hat
los been unbound frorn @ variable back into pus poot -
of uot ber moron Yoldnase
oo op ba
cit—— Ew EO———— c tra. |
wee duri'p, 9, BAICh Hh? Vary
~ |) UFekme)- of a vortabse 1 he “ OP : *
fe ocak.
Bi bund 40a gece mercy _
FS 4, ano bie time of @ cow b Je begins wher rt eh
bound + agpetthe leu and endy whem tb unboeng;
Li -foorn Hout cet .
To investigate — Storage bracings of \oouably ,
1b 15 Loven,
yo spore Sm@br yariabte into Y Gabag™ 4
[— l. State variably
y + Stack Anamic veudaslys
f— 3 expltr+ hea P-dyrorna¢
Gimp lore heap - dyromsic
ic ) stotre Uareably are thoht hat ane bound to memory
[Cells betove program eneuulran begins end Remains bong
C to hoe some memory cells wml prprens ateutriorn
L4} termiyode,
7 bond woouably hare severe valuable appls to ryrg,
[ner aaea, odvoukape. of Sp ehbu een oy Ee a
[> au addewng of SV On be dire th, oruer Kinds of
c Maugbls often Require. indsreck octbuesing, which & Sli
[iF Storage con't be shored erreng \wourbly
[)? Rindiig to storage. Vas faded. Raoechelity
b- Be stro bag ony S.U'S copnod Support Reovayype sub-
L Pepe.
i & SPN are hore whose Storege bindigs a6 Creahed Wun
U tw devbooibn staremenss One ehloovatedy bow tehow ap!
i are Kasra, bond ,
[ ade os (seounsbot)
Io poset,expert Heap Pgromc
L ar boge wlicchn'. yy 0 Reltaye “Memory when “tin.
- dbyeck 1A No brger IH UG Fis System estoy 5 he
& .
“unused objees ond yeuss WS ™memey slot for nwo
objew’
Type ee ype checks means Checking Het each
74
opercur'ao loutd Yecerva propeY 0 OF argum ene
pooper dara “re ines .
A =B8XST+A4.
“up sted of
=) &5,a- Inve i i
tnt, Hoat @ dubLe
D> ¥ E+ are occa bIn
> TF one ome Of the Wwooudble vs a Clanactovs ten /t
gues “ape ervey”.
, Ry Pa.
0 a re Checking
Lys Comcep of type bog which
abjews “Hot induates ste cbt yee ot
Lyk ta domcad: TUN Ar 4
is stereet, (2, ech ee
Whe objec .
> peat & Prolog ug dynomre type chencdvg
43 y more Hemable
2) nlo detkootor Required
3) -ype moy fre choragiead Beary Sree tn *
Bs) Di Rett 0 debug
2 mote storage
O° Siawe “gre Charting dt
Me.) cowyg dhe - pgm
Are tleingy
O."" Comprlun Gates jnfownowran .
Ws: nol so” Pesredahe
oteuy,, dung, Gor prt beet He
tyonybal ays hig caued sehen HePrimthve pata yee Doka ‘ype “Was ane pot ndd Ste
—— = _ ocd Wook ¢ God
| & oF oH “ype ane Called. PDT,
of)
— ate Brel are aout provided by oy pyrene Dregne cel
al PDA. od abo cated o, pwlt- IN dota ya.
YNemEwe Paka Ypes Cyor Proesrrg 70774 Com pla ip
2) G00 ktory chia. “pp.0s)
O closocler 7)
FY Numeric Tppas:
[ob integer. a pam beg Supports snkegn Dara ype.
l 292° Java: eludes four aigned Integr rms'-—
zy byte, Short, tnt ond br .
b+
Pome brguogts, fr 22, 6, cg Ge, included angi
fnegers types- which are Simply types oe integua
Valu useHout Signs,
A Sioned tnt. Value &% supreeted in a Computer bp
a sewing of bite, with one of te bs Mproyeutig
he seg,
> most Computers now. we & nofein'or called to's _
Complrynut +o store —ve int
y
the pepreyntatcon of a -ve im's 1% to¥med by asin
the hop'caus Complomut oF she ave version of +h nom
addy on.
Ly one! -compluut notation tA, SHU Lye
Gi
U y) Hoarng -
Point. Floating - poi doza “yres mode Rat nm!
> moa }
beguoyps include tusp Moastyg ~ point fyPesy atten
[ Called $= Float & cbuble.
4" 3
L P.B3333B 9 Tue re no ending colted Frachen
WM ed Pemowtecelsion.. aheer :333333 is upto, F40.8 members we lon lonyely
7 I €xpmut & frock Combirosion 9B wailed Rrat .
ge Floattrg - point ormrats? -
°) Atrghe precrston.
gbits a3 bit S-
S| | exponut
| sign bt @
b) buble precision’ \
be gp BS
n bs j
Lemwl en
export <
i
San bre &).
ompltt.’- se Support S & Commplir. dota Fe.
ex fortron & Putten .
> In python, he trraginaty, value ts papretet 4 Se
Aonowsd by I, oy a
eur (4 +3))
ome torsion”
CUMO- ppt boees Gorputers ros ave designed“? ee .
burns Systers app lcasrors, hove hlw subir? tor
HPO. 41 stores a fenced ne of ceuirab aigrts, cota
dacmet point o oa sived postion in thu witit
ta gpd or» are coed duvet pols. rey
CoBok, ec ond FH brgiy's have
much
de wmwat cb” yes .
- ;
> Deu'mat sypes ale sired ver uKe chvacter Gira,
a binary wdes for th deviver digiis. “phage Rep tesemiatin,
aie Caled binary Codet decal (BeD),1
Matuer bay only hoo ements, B
Boolean yest shew range oF
roe
Ours Tae | ¢ oe fot fol
> shey were tntrodiced by A Léwt 60. ana, have, been
Inclucled fn past Jerrad ~ porporc rgucgs desig Soce t
¢ Chavacter types}
> rey gmerally, here are 1ag characters bond) 1t'S° Repreribey
i
ay a Choacter chia wee: (0 40 124)
AMD we Inve nse valuy (american std cde 'r info in
a POTS toe Whe 4
? itode 4p Reproput Choaclers in, Hr gone we Java, 3
OHtur format wlleed wmicode (unipode Conorecunr) published >
Whe UCS-2. in tags, Bris a b-bit Ghooueter “see ,
—
/ AFter (aq1, we Pate anoHur étd, 150 devdeped bp che
(ede romus) a vl8-y.
73) java omy St “tage 40 USC? “the” dinitod @\ \chara cles Set.
Since +hyn, tH hay found “ils “tay nb javascript, phpten,
Perl, Ctr ond Far Cis
io + “
Strings + ni af F
4 tm Ufo i ‘ \
ee r
2 A Characier Stig yre, % me iD hich the val Gort
of Sequnce of Chooacters” wail "e ‘ » denote by dbl
eee tte eee
Ny J
guotet ("), ‘ . , . cc
2h reg! | e
Strives ond. a otnety operanars,. euignmens loncateroton, Gubsrid
teherenle, ppeanin oma pabeio rmatthing
iM yr Ta- aay Ly Here Wwe bole pitas & Small Aetiors «44h
just on expruston || “ w 4 7
Ss fh Supports divecaty fo peboirm come’ Operuiony “yey seirg
_
Stnvoon. ryetiivat "CG mann beppimosee atin ;
1 0 & Cth
iy
Ce Cy we char arvayh to stow Chooucter trivgs,
ca".
a clon mystrivgt) & “pory" ;
,
a
Chas mpg (59 2 P'p) Sa 0.94;
, J
Java” - Reve, we save cheyes. 14 US AwWO pres. » const ‘ae
>fhyw we wd vo olebuine om sung, we Vow as cog fee taser
Sof thas is cotled objec . e .
> ob;
pjee OF chs A cebu ns evry of oso. clung s-
Br Strvig = preg") nsinnt
cea 8) = new Serving ("" poseg? yi
String Bublici S. > Nevo evorgpubbor ("fg") 3 > Chorglole.
ce ena Baby:
| . . tovees Har stenilonr
| _ te and Raby inelade Sg me cre ris
| to hose oF SoMa.
ty
| cel, sir.
5) python: pyiter ine i, Serine OD primitive dype
we Gn's chonge, .
yEC eA.
pg e¥ CDULeS \- ere
th G@ied abrcbukes »
Ane : neces Hoan pe » Sir
’ Wine ae ‘nor be ana)
2. Rouktnre (vam €, formar porameters of
Poot Com vovrrr'ours),
3. GtatemedS (ompuased actos) 7
. ina
Descriptor. tor each orci, asrribwae info tA Contained
; Raspaariord aud ay descrip bt «PT orvo, a
SOY types’. of oll Sar cor Sore :
a. ~~ 2 oun eld: A w
"bel iy 9 Romogensowrs eggreqote
* Structoudd cba yres
2 dadex P subs exept.
Ls
[4 ex arog OG
feat tome of The wo,
[| & pyres ond Yc twabwr) subseripts —> ave Some |
bE PC oyrays ave SomeliMid — Coble Penrte mappings ,
PF SYyorbolreatyy
array. name (abserrpt— alee list) eemact
USE SR ieee
oe " sbneut).
| \
-—- domroin
fa NU]
- how a Katie. M0. (DF Uoltcs -
L_, in -p9ro beg Dp sub serip ts, ace “boun ded by cu
far oft mT ry peor
ay “sf Sent gm a4, Subsoniph
i
L 7 tor 4 Jn Ada roping
a Som 12 Sum + @ (I)
> dt yediceS the Readobi'l” a porortun’s ore” teal A
both Subporgram poomeders ond wanna Stulosorip t3
!
QO > St, Javon APT Ue eee)!
ti
1 lo “odio 5 boohan, choncters and’) entiine ration
| pived Me PS Nps
5 ee eee wor determined daerty
ki Da tw '
1210 ae RRP Dep, wy
L “Thus doy 1 Friidoy) ;’ a Ay i ms
not
em alee =le
Pad ;
Yo Rergp ert0D cel —
_—i Sn = . alt %y
a. £ oan 0a the Wolue out ofy gn °! + Co + 3) = —
n Tired (rss Crd CC a ‘or AYES seh ane
\ ary (u J a “Y roe.
cs) thre 3 “e Indes cule! ' ey yee
Ary ar ob 5h jana
a i, abo Known 2a Korge chuckhD
4
oe “4 WY oto Mable
jn |. brguge, ton be Aegerble He prog rom,
ay 4 money) ( @ lst) )
iL we wm wo call cab Olemut cel ~Hhoe-Hme ur coh
gisilile jes park hequaye.
> pert 1s Q «ve Aubserrpl » +he pusd Co],
> SubSeipt = ond ary Ctegor te
:
!
Y aubseePh ab sions foorn dower bound.
*; fortan ast, nd foun bound
| ord 4 am be Set €o fntepu
, 4n dowetkound SubSerip) TY
i
4n java. 4t sto
of = tortran 1s ae
must be Speetied a the
bal on The subscript or Apolites's Thre me £ cateprni
npindig 40 Storey 2» / chine d+
4. bindrg to Subscript YS ond freee
S. allocated .