This is a very convenient way to supply different test files to your program, and to
save the output for later editing and printing. If you want to test the effect on
your program of input lines longer than the Windows limit of 511 characters, or the DOS
limit of 127 characters, you must redirect input from a file containing the long lines you
wish to try.
This file explains how to make this work.
Turbo C version 3
Turbo C always creates DOS executable files. You don't need to do anything
special. The resulting programs will correctly handle redirection on the DOS command
line.
Borland C versions 4.x and 5.x
By default, the more recent versions of Borland C create "Windows" C programs
that ignore redirection when started from DOS command lines. To build a DOS
executable, you need to do this:
- Create a new Project.
- When presented with options for the new project, select the Application (.exe) type and
the "DOS standard" sub-type using the drop-down list boxes.
- When the project is created, import your C program source and build it. The
resulting *.exe file can be run from a DOS prompt and will handle redirection.
Problems
Apparenly the better features of the Borland debuggers are not available when you build
a DOS executable. You may find it best to debug your files in the Windows
environment, and only build the DOS executable when it comes to the final input/output
testing phase.
![](../_themes/rmnsque/romhorsd.gif)
Last revised: Thursday January 15, 1998 01:29.