bug0261.pp 497 B

1234567891011121314151617181920212223242526
  1. program bug0261;
  2. { test for operator overloading }
  3. { Copyright (c) 1999 Lourens Veen }
  4. { why doesn't this work? }
  5. uses
  6. bug0261a;
  7. var a : mythingy;
  8. b : myotherthingy;
  9. c : mythirdthingy;
  10. begin
  11. a.x:=55;
  12. a.y:=45;
  13. a.c:=7;
  14. b:=a;
  15. c:=a;
  16. if b.d<>c.e then
  17. Writeln('Error in assignment overloading');
  18. if b<>c then
  19. Writeln('Error in equal overloading');
  20. Writeln('Sizeof(mythirdthingy)=',sizeof(mythirdthingy));
  21. Writeln('Sizeof(mynewthingy)=',sizeof(mynewthingy));
  22. end.