Extra Line Feeds with WRITE in Version 3.31

Product Version(s): 3.31 3.32
Operating System:   MS-DOS
Flags: ENDUSER | TAR54481 buglist3.31 fixlist3.32
Last Modified: 30-SEP-1988    ArticleIdent: Q11679

Problem:

Pascal Version 3.31 I/O seems to be behaving incorrectly. Line feeds
are inserted when they should not be. If I use the following
statements a carriage return is executed, but not a line feed:

    WRITE('ENTER A NUMBER');
    READLN;
    READ(F);

As a result, the output is (and should be) overwriting the previous
output. If the above statements are executed a second time, however, a
line feed is inserted in the first write statement.

Below is a copy of a program that duplicates the problem. This program
works correctly in Version 3.20. However, in Version 3.31, if you
execute the following program more than once you will see the line
feed being inserted incorrectly with the first write statement:

    program test2(input,output);
    var
     num:integer;
     rnum:real;
     letter:char;

    begin
      write('enter a number (integer):');
      read(num);
      write('enter a real number: ');
      readln;
      read(rnum);
      write('enter a char:');
      readln;
      read(letter);
      writeln('The number is: ',num:3);
      writeln('the letter is: ',letter);
      writeln('the real number is:',rnum:5:2);
    end.

Response:

Microsoft has confirmed this to be a problem in Version 3.31. This
problem was corrected in Version 3.32.
