[comp.sys.mac.programmer] Picky Think Pascal compiler quirk - explanation sought

gt4586c@prism.gatech.EDU (WILLETT,THOMAS CARTER) (10/25/90)

i discovered a strange little quirk in think pascal when the range checking
option is enabled.  one of the functions of the range checking is to flag
nil pointer references.  in my code i had something like
type
  Xptr = ^extended;
var
  X: Xptr;
begin
  TheSize := SizeOf(X^);

Now with range checking enabled, i get an error message during compile about
a nil dereference.  when i disable the range checking, it compiles fine, and
the code runs just fine.  is what i have done here sloppy programming and
is that why the compiler barfs when range checking is enabled, or is it that
the compiler doesn't understand that what i am doing is acceptable?  any
explanations would be appreciated.


-- 
thomas willett 
Georgia Institute of Technology, Atlanta  
gt4586c@prism.gatech.edu
"Violence is the last refuge of the incompetent." - Salvor Hardin (Foundation)