home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / pascal-.zip / pascal- / tests / conformance / syntax < prev   
Encoding:
Text File  |  1992-11-21  |  653 b   |  28 lines

  1. {Test syntax analysis}
  2. program Syntax;
  3.   const
  4.     a = 1; b = a;
  5.   type
  6.     T = array [1..2] of integer;
  7.     U = record f, g: integer; h: boolean end;
  8.     V = record f: integer end;
  9.   var
  10.     x, y: T; z: U;
  11.   procedure P(var x: integer; y: boolean);
  12.     const a = 1;
  13.     procedure Q(x: integer);
  14.       type T = array [a..2] of integer;
  15.       begin
  16.       x := -1;
  17.       x := x;
  18.       x := (2-1)*(2+1) div 2 mod 2;
  19.       if x < x then while x=x do Q(x);
  20.       if x > x then while x <= x do P(X, false)
  21.       else if not (x<>x) then { Empty}
  22.       end;
  23.     begin if x>=x then y:= true end;
  24.   procedure R;
  25.   var x: T;
  26.   begin x[1]:=5 end;
  27. begin z.f:=6 end.
  28.