home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Delphi / PascalIdent / _SETUP.1 / test.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-03-21  |  2.1 KB  |  111 lines

  1. program text;
  2. uses Crt, Dos;
  3.  
  4. type Tar = array[0..9,0..9] of Integer;
  5.  
  6.   TR = record
  7.          a:Byte;
  8.          b:Integer;
  9.          c:record
  10.            d:Boolean;
  11.            end;
  12.          case Integer of
  13.            1:(o:Byte; p:Integer);
  14.            2:(case Byte of
  15.                1: (r :Integer);
  16.                2: (s, t :Byte))
  17.       end;
  18.  
  19.   Tobj = object
  20.   end;
  21.  
  22.   To2 = object(Tobj)
  23.   private
  24.   a:integer;
  25.   public
  26.   function geta:Integer;
  27.   end;
  28.  
  29. var
  30.   a,b,c,d,e,f :integer;
  31.   i,j :Byte;
  32.   v :Tar;
  33.   s :String;
  34. const cx :Tar = (  {adasdfsdfasdfasdf}
  35.        (0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  36.        (1, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  37.        (2, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  38.        (3, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  39.        (4, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  40.        (5, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  41.        (6, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  42.        (7, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  43.        (8, 0, 0, 0, 0, 0, 0, 0, 0, 0),
  44.        (9, 0, 0, 0, 0, 0, 0, 0, 0, 0));
  45.  
  46.    c1      = 10;
  47.    c2      = 20;
  48.    c3      = 30;
  49.  
  50.    d1     = 10;
  51.    d2      = 20;
  52.    d3       = 30;
  53.  
  54. label lab;
  55.  
  56. procedure xxx;
  57. procedure Nested;
  58. var a:byte;
  59. begin
  60.   Writeln;
  61. end;
  62. begin
  63.   asm
  64.   mov ax,bx;
  65.   mov dx, cx;
  66.   end;
  67.   d:=e;
  68.   f:=1;
  69. end;
  70.  
  71. function To2.geta:Integer;
  72. begin
  73.   geta:=a;
  74. end;
  75.  
  76.  
  77.  
  78. begin
  79.   a:=b;
  80.   if (a>b) or (cx[a+b,f]=d*e) then {comment1}
  81.   begin
  82.     for i:=1 to {comment2} 10 do
  83.     for j:=1 to i do
  84.     begin           {comment3}
  85. lab:  a:=b;
  86.       c:=d;
  87.     end;
  88.         a:= b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b;
  89.         s:='This is just a test string; This is just a test string; aaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbb cccccccccccc ddddddddddd This is just a test string;';
  90.         if a = b then Write('xxx');
  91.   end
  92.   else
  93.   begin
  94.        Writeln;
  95. {}     Writeln;
  96.   end;
  97. (*  if c<>d then c:=d
  98.   else if e=f then while e>0 do Dec(e);*)
  99.   if c<>d then c:=d
  100.   else if e=f then while e>0 do Dec(e);
  101.  
  102.   case e of
  103.     1,2,3,4,5: begin
  104.                  a:=1;
  105.                  b:=2;
  106.                end;
  107.     6,7 :c:=1;
  108.     8: if b=2 then a:=2;
  109.     else f:=2;
  110.   end;
  111. end.