home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / pub / users / Harry / compilers / p11 / tst / read2.pcat < prev    next >
Text File  |  2006-03-05  |  843b  |  37 lines

  1. (* This program tests IRreadFloat. *)
  2.  
  3. program is
  4.  
  5. procedure foo (j1, j2, j3: real) is
  6.   begin
  7.     write ("About to call readFloat (j1, j2, j3)...");
  8.     write ("PLEASE ENTER 3 REALS:");
  9.     read (j1, j2, j3);
  10.     write ("j1 = ", j1);
  11.     write ("j2 = ", j2);
  12.     write ("j3 = ", j3);
  13.     write ("About to call readFloat (i1, i2, i3)...");
  14.     write ("PLEASE ENTER 3 REALS:");
  15.     read (i1, i2, i3);
  16.     write ("i1 = ", i1);
  17.     write ("i2 = ", i2);
  18.     write ("i3 = ", i3);
  19.     return;
  20.   end;
  21.  
  22. var i1, i2, i3: real := 0;
  23.  
  24. begin
  25.   write ("About to call readFloat (i1)...");
  26.   write ("PLEASE ENTER AN REAL:");
  27.   read (i1);
  28.   write ("i1 = ", i1);
  29.   write ("About to call readFloat (i1, i2, i3)...");
  30.   write ("PLEASE ENTER 3 REALS:");
  31.   read (i1, i2, i3);
  32.   write ("i1 = ", i1);
  33.   write ("i2 = ", i2);
  34.   write ("i3 = ", i3);
  35.   foo (1,2,3);
  36. end;
  37.