Out of Memory Error in PAS2

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

The following example yields an out-of-memory error in PAS2 of the
compiler. If buff_ads is declared to be of adr type rather than ads
type, the program will then compile the code below.

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

The following code demonstrates the problem:

   program test(input, output);
   type
   buff_rec = record
   BUFF1_PTR:adrmem;
   end;
   var
   BUFF_ADS:ads of buff_rec;
   BUFF1:lstring(50);
   BUFF2:lstring(50);
   LOC:word;
   TMP_ADR:adrmem;
   begin
   with buff_ads^ do
   begin
   BUFF1:='1234it worked!';
   LOC:=5;
   BUFF1_PTR:=adr buff1;
   TMP_ADR:=adr buff1_ptr^[loc];
   movel(adr buff1_ptr^[loc],adr buff2[1],10);
   movel(tmp_adr,adr buff2[1],10);
   BUFF2[0]:=chr(10);
   writeln;
   writeln('********p3582');
   writeln;
   writeln(buff2);
   end;
   end.
