tbs0299.pp 555 B

1234567891011121314151617181920212223242526272829
  1. type
  2. TwoChar = Array[0..1] of char;
  3. Empty = Record
  4. End;
  5. const
  6. asd : TwoChar = ('a','b');
  7. procedure Tester(i:TwoChar; a: Empty;l : longint;var ll : longint);
  8. begin
  9. i[0]:=i[1];
  10. Writeln('l = ',l,' @l = ',hexstr(longint(@l),8),' @a = ',hexstr(longint(@a),8));
  11. inc(ll);
  12. end;
  13. var
  14. a : Empty;
  15. l,ll : longint;
  16. begin
  17. l:=6;
  18. ll:=15;
  19. Writeln(Sizeof(asd));
  20. Tester(asd,a,l,ll);
  21. Writeln(asd);
  22. if (ll<>16) then
  23. Begin
  24. Writeln('Error with passing value parameter of type array [1..2] of char');
  25. Halt(1);
  26. end;
  27. end.