fork download
  1. type
  2. TType = Integer;
  3.  
  4. procedure XorSwap (var a, b : TType);
  5. begin
  6. a := a xor b;
  7. b := a xor b;
  8. a := a xor b;
  9. end;
  10. var
  11. a, b : TType;
  12.  
  13. begin
  14. a := 1;
  15. b := MaxInt;
  16.  
  17. WriteLn (a);
  18. WriteLn (b);
  19.  
  20. XorSwap (a, b);
  21. WriteLn (a);
  22. WriteLn (b)
  23. end.
  24.  
Success #stdin #stdout 0s 276KB
stdin
Standard input is empty
stdout
1
32767
32767
1