Playing around I had a more questions about pointer operations I've never used 
myself.

1) what does "i := x - x;" do and what is it's purpose and why doesn't "x + x" 
work the same? 
2) I've used pointer equality of course but what does "x > p" do and what is 
its purpose? 

===============

var
  i: int64;
  x: ^byte;
  p: Pointer;
begin
  i := x - x;
  i := x + x;  // Error: Operator is not overloaded: "^Byte" + "^Byte"

  if x > p then
    ;
end;

Regards,
Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to