Redirected Input File Causes Run-Time Hang

Product Version(s): 3.13 3.20 3.3x
Operating System:   MS-DOS
Flags: ENDUSER |
Last Modified: 30-SEP-1988    ArticleIdent: Q10406

Problem:

Using the ::N notation to write an integer causes a run-time error. We
used the ::N notation to write an integer with a radix other than 2,
8, 10, or 16. This procedure causes a data-format error in the file
USER at run time.

The following is sample code:

   program wformats(input,output);
   var
   I:integer;
   begin
   I:=32;
   WRITELN(I::3);
   end.

Response:

MS-DOS does not return an end-of-file from a redirected input file
when it runs out of text; DOS just hangs. This problem has nothing to
do with Pascal.

Put a ^Z (CTRL+Z), or chr(26) in the file and it will work
properly.

