The Tower of Babel

Procedure read_string

procedure read_string (
    var A : array[1..10000] of char, length : integer);
var
  index : integer;
  character : char;
begin
  index := 1;
  while index <= length do
    begin
      get(character);
      A[index] := character;
      index := index + 1;
    end
end

A and length are formal parameters. As the value of A is changed within read_string, it must be a var parameter.

In the call read_string(T, n), T and n are actual parameters.
 
 

[TOC][Next]


CS1104 Main Page
Last Updated 01/05/2000
© L.Heath, 2000