Download presentation

1
**MAIN BODY OF PROGRAM DECLARATION ACTION**

PASCAL PROGRAMMING MAIN BODY OF PROGRAM DECLARATION ACTION

2
DECLARATIONS CONST TYPE VAR PROCEDURE FUNCTION

3
**EXAMPLE Program Example; uses dos,crt; const A = 10; Book = ‘Kitap’;**

Good = true; Bad = false; MsgHelp =‘Yardım için F1 tuşu’; Days : array[1..7] of String[5] = (‘Mon’, ‘Tues’,’Wed’,’Thurs’,’Fri’,’Sat’,’Sun’);

4
type Isimler = array[1..100] of String[20]; Names = Isimler; SurNames = Isimler; Name = String[20]; ArrayValues = array[1..500] of Real; Student = Record Isim : Name; Soyad : Name; Age : Integer; end;

5
**var Talebeler : Isimler; x,y : ArrayValues; B : array[1..200] of real;**

k : Notlar; B : array[1..200] of real; C : array[1..10] of char; Kelime : String[20];

6
program Alan; var A : Real; I : Integer; procedure ComputeArea(x,y:Real ; var Area : Real ; var N : Integer); begin Writeln(‘How many significant digits after decimal ?’); Read(N); Area := x * y; end; ComputeArea(5,5,A,I); Writeln(‘Area = ‘,A:3:I); end.

7
program Alan; var A : Real; I : Integer; procedure ComputeArea(x,y:Real); begin Writeln(‘How many significant digits after decimal ?’); Read(I); A := x * y; end; ComputeArea(5,5); Writeln(‘Area = ‘,A:3:I); end.

8
program Alan; uses unit1; begin ComputeArea(5,5); Writeln(‘Area = ‘,A:3:I); end.

9
unit unit1; interface var A : Real; I : Integer; procedure ComputeArea(x,y:Real); implementation procedure ComputeArea; begin Writeln(‘How many significant digits after decimal ?’); Read(I); A := x * y; end; end.

10
**STATEMENTS SIMPLE STATEMENTS X := y * z + w/v -u; Name := ‘Demir’;**

STRUCTURED STATEMENTS SIMPLE STATEMENTS X := y * z + w/v -u; Name := ‘Demir’; Sentence := ‘ This is a sentence’; BunuYaz(‘This is a sentence’); Satir := Line(1);

11
**STRUCTURED STATEMENTS**

IF <boolean expression> then begin statement1; statement2; true . end else statements; false end;

12
**STRUCTURED STATEMENTS**

case <ennumerated expression> of {case 1} : begin end; {case2} : begin end else begin

13
**while <bolean expression> do**

begin end; repeat until <boolean expression>;

14
for I :=n to m do begin end; this can also be from m to n where m>n

Similar presentations

Presentation is loading. Please wait....

OK

ARRAY PADA PASCAL DOSEN : NURAINI PURWANDARI.

ARRAY PADA PASCAL DOSEN : NURAINI PURWANDARI.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Gallbladder anatomy and physiology ppt on cells Ppt on natural resources and associated problems Ppt on self awareness images Ppt on technology vs science Ppt on indian space program Ppt on area and perimeter of rectangle Ppt on building information modeling classes Ppt on gulliver's travels part 4 Ppt on business model of dell Ppt on the rise of nationalism in europe