daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Jan 19th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program test;
  2. uses crt;
  3.  
  4. const MEM_DATA = $6000;
  5.  
  6. type Ttest = record
  7.     arr: array[0..3] of byte;
  8. end;
  9.  
  10. var t:Ttest;
  11.     tp:^Ttest;
  12.     a,a1,a2:array[0..0] of byte;
  13.     i:byte;
  14. begin
  15.  
  16.     tp:=pointer(MEM_DATA);
  17.  
  18.     //a:=tp^.arr;
  19.     a:=(tp^.arr);
  20.  
  21.     for i:=0 to 3 do begin
  22.         t.arr[i]:=i+100;
  23.         a[i]:=i+200;
  24.     end;
  25.  
  26.     //a1:=t.arr;
  27.     a1:=(t.arr);
  28.     //a2:=tp^.arr;
  29.     a2:=(tp^.arr);
  30.  
  31.     for i:=0 to 3 do begin
  32.         writeln(a1[i],' ',a2[i]);
  33.     end;
  34.  
  35.     readkey;
  36.  
  37. end.
RAW Paste Data
Top