On Mon, 25 May 2009 21:09:44 +0000 Prince Riley <wmarketi...@gmail.com> wrote:
> Type checking for valid > pointer arithmetic and the difference between a 'null' or empty pointer > and one that has the lowest value of it's type. Maybe the use of 'nil' in an expression should not be allowed at all (except comparisons). As I understand its meaning is that it sets (any) pointer to an invalid value. But I seem to have read that in case of microcontrollers 'NULL' at times means $FFFF, and, according to Wikipedia, some computers assign the max negative value to NULL: http://en.wikipedia.org/wiki/Null_(computer_programming) So, any reliance on nil being 0 (or any definite value) would seem unreliable (sorry for the pun). Taking this further, nil = prt(0, 0) shouldn't be true (though in most programming languages they are equivalent, and in case of a PC-like environment it's complicated to represent a really 'invalid' scalar value). John _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal