1: program blah(input, output);
   2: const
   3:     CONSTANT = 3;
   4:     FLTCON = 3.14;
   5: type
   6:     Index = 1..10;
   7:     intarray = array[Index] of 0..100;
   8:     rec = record
   9:         x : integer;
  10:         y : char;
  11:         z : integer;
  12:     end;
  13: var
  14:     i : integer;
  15:     x : real;
  16:     a : array[1..10] of intarray;
  17:     r : rec;
  18:     p : ^rec;
  19:     b : boolean;
  20:     unused : integer;
  21: 
  22: function first(var p : integer) : integer;
  23: begin
  24:     i := p;
  25:     r.x := 4;
  26:     r.y := 'y';
  27:     r.z := 6;
  28:     b := true;
  29:     first := p;
  30: end;
  31: 
  32: procedure start;
  33: var q : integer;
  34: begin
  35:     q := -5;
  36:     q := first(q);
  37:     a[i][1] := q;
  38: end;
  39: 
  40: procedure init;
  41: var i, j : integer;
  42: begin
  43:     b := false;
  44:     for i := 1 to 10 do begin
  45:         for j := 1 to 10 do begin
  46:             a[i][j] := 10*(i-1) + j;
  47:         end;
  48:     end;
  49:     start;
  50: end;
  51: 
  52: begin
  53:     init;
  54:     a[1][1] := 3;
  55:     a[10][1] := 2;
  56:     a[1][10] := 1;
  57:     writeln('garbage');
  58:     readln(i);
  59: end.
Last modified: 1984-04-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1462
Valid CSS Valid XHTML 1.0 Strict