



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Prof. Balamohan Pawar delivered this lecture at Allahabad University for Aeronautical Engineering and Computer Programming course. Its main points are: Procedure, Declaration, Definition, Constant, Variable, Begin, End, Call, Return, Function, Parameter
Typology: Slides
1 / 6
This page cannot be seen from the preview
Don't miss anything!




procedure name (arguments) is
constant definitions variable definitions procedure definitions
begin --name statements end name;
-- comment explaining purpose
in , out ,
begin
end adjust;
-- exam mark in out INTEGER -- overall subject mark
-- local declarations
-- statements
get_integer ( exam, 0, 50 ); get_integer ( number, 1, 5 ); get_integer ( number, low, low+4 );
begin get_exam (exam); get_lab (labs); mark := exam + labs; adjust (exam, mark); PUT (mark); print_grade (mark); end ;
procedure abs ( x : in y : out ) is begin if x >= 0 then y := x; else y := -x; ; end abs; (^) abs (x,y);
abs (-4, temp); y := 10 * temp;
can differ for each call GET ( val );
-- abs: absolute value
INTEGER; -- argument INTEGER -- abs(argument)
-- abs
end if -- y := abs(x);
-- temp:= abs(-4); -- y:= 10*abs(-4)