> On Aug 10, 2023, at 5:43 AM, Bernd Oppolzer via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> PTRADD (p, i) - p is type ANYPTR, i is integer, result is of type ANYPTR
> PTRDIFF (p1, p2) - two pointers, the result is integer
> ANYPTR is a predefined type, compatible with every (typed pointer) 
> ADDR (x) is a function (borrowed from PL/1), which returns an ANYPTR ... and 
> it is allowed for all types of variables
> PTRCAST is the same as PTRADD (p, 0) - and is used to cast pointers between 
> incompatible pointers (not type safe) 
> 

Not a bad idea to clarify this. Besides p + 1 the pointer math operators are 
difficult to understand and feel antiquated.

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