Quick Test 12,13: Modular Programming

1. What two types of modules do you know in PASCAL?

1: 
2: 

2.  What are the advantages of writing modules

1: 
2: 

3. What will be the result of the next program?
PROGRAM Procs;
Var x: real;

PROCEDURE WriteFormatted(r: real; n: integer);
begin
  WriteLn(r:0:n);
end;

begin
  x := 10.0;
end.
10.0
r:0:n
0
This program doesn't have output. We forgot to CALL the procedure!

4. What is the diference between a Procedure and a Function?

A Function has input parameters, a Procedure doesn't
A Function returns an output value, a Procedure doesn't
A Procedure has input parameters, a Function doesn't
A Procedure returns an output value, a Function doesn't