• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Quick DOS question:

Status
Not open for further replies.

snaildog

Member
I'm doing a programming assignment (concurrent programming :S) with one of these old DOS compilers that just reads the program from a text file and outputs straight into the command prompt window. How would I get the output to go into a text file instead? Cheers!
 

Slo

Member
Wait, you just want to capture what's written to the DOS prompt? Easy. Just when you run the compile command, use the >> operator to point to a log file.

C:\> cl someSource.c 1>>C:\compile.log 2>>C:\error.log

1>> will log stdout, 2>> will log stderr. Use a single > if you do not want to append to the log file it it exists.
 

snaildog

Member
Ah thanks a lot, that's it.

The compiler is "PascalFC", and I think students at my uni are the only ones in the world who use it. It's basically programming concurrently (channels, remote invocation, semaphores etc) using Basic.
 
Status
Not open for further replies.
Top Bottom