Nil Not Equal to Zero

Product Version(s): 3.20
Operating System:   MS-DOS
Flags: ENDUSER | TAR17028 buglist3.20 fixlist3.30
Last Modified: 30-SEP-1988    ArticleIdent: Q10403

Question:

Super array pointers allocate words to hold the upper bound of the
allocated type. In the following program, the word following the
pointer holds the upper bound. When nil is assigned to pointer, the
value of 0 is assigned to the pointer, and 2 is assigned to the upper
bound portion. Why is 2 assigned and why not 0 also?

The following is the short example code:

   program test(input,output);
   type hundred=lstring(99);
   supar =super array[1..*] of hundred;
   VAR POINTER:^supar;
   Y :word;
   begin
   POINTER:=nil;
   Y:=sizeof(pointer^,20);
   writeln('size returned =',y);
   end.

Response:

Microsoft has confirmed this to be a problem in Version 3.20. This
problem was corrected in Version 3.30.
