Professional Documents
Culture Documents
Programming Day 2
Programming Day 2
a name can be assigned to a Pascal program A variable's type alerts the computer about the
before the beginning. type of data that we are going to store inside it
jevigykla wdrïNhg fmr thg my; mßÈ úp,Hl o;a; j¾.h u.ska wm úiska tys .nvd
kula fh§u isÿ l, yel lrkafka l=uK j¾.fha o;a; o hehs
mß.Klhg woyila ,ndfoa
var
a : integer ;
G. reusing a variable
b : real ; tlu úp,H kej; kej; Ndú;h
c : char ;
d : string ;
var
e : boolean ;
begin a , b : integer ;
a := 7 ; begin
a := 7 ;
b := 35.8 ;
c := ‘K’ ; write ( a ) ;
a := a + 1 ;
d := ‘Ravindu’ ;
write ( a ) ;
e := True;
b := 5 ;
An expression containing the assignment b := a + b ;
operator is much better to be read from the right write ( b ) ;
side to the left readln;
wdfoaY lsÍfï fufyhjkhla wvx.= m%ldYKhla end.
ol=fKa isg jug lsheùu jvd;a iqÿiqh
Constants
ksh;
Const
Pi = 22/7 ;
Var
Begin
End.
Prepared by:
Ravindu Bandaranayake