Technical Notes Database TN763D.txt I/O REDIRECTION $P128 $G128 Category :Pascal Platform :All Product :Turbo Pascal 3.0+ Description: Q. How do you do I/O redirection? How can I write to standard output? In version 3.0, I used $P128,G128. What do I do in Version 4.0+? A. If you want to do DOS I/O redirection when running an .EXE file generated by Turbo Pascal 4.0+, DO NOT use the Crt unit. If you do, make sure you assign a text file variable to the standard DOS output device. For example: Assign(Output,''); { assign a text file variable } { to a null file name } Rewrite(Output); { do a rewrite here } Any Write statement that does not specify a file variable will be redirected to the DOS standard output file. You can also use Write(Output,...). Reference: 7/16/98 4:35:35 PM
Last Modified: 01-SEP-99