Problem with Assigning the Chr of a Trunc

Product Version(s): 3.13 3.20
Operating System:   MS-DOS
Flags: ENDUSER | TAR15705 buglist3.20 fixlist3.30
Last Modified: 16-DEC-1987    ArticleIdent: Q10397

Problem:
   Assigning the chr of a trunc generates a two byte value
overwriting the target string. The following is a short
example code:

   program b(input,output);

   procedure b1;
   var
   I: integer;
   S: string(8);
   begin {b1}
   S := 'QQQQQQQQ';
   FOR I := 1 to 8 do
   begin
   S[I] := chr(trunc(80.0));
   WRITELN('I = ',I:0,' s = ',s)
   end
   end; {b1}

   begin {b}
   b1
   end. {b}

\.BODYTEXT
Response:
   PAS2 was performing an optimization which was
eliminating the coercion node on assignment trees.
   This problem was corrected in Version 3.30.
