View Full Version : Printing colored text in fortran?

April 5th, 2011, 06:34 AM
Hello, everyone.

The title header says it all: Is it possible to print colored text in fortran?

I imagine it must involve using the "write" command with some sort of formatting?

Thanks in advance!


April 5th, 2011, 06:55 AM
That's a function of your output device, not the language. FORTRAN (disclaimer: My FORTRAN training dates back to 1984) prints characters out, and the output device interprets those characters. If you print an escape sequence the output device (printer or terminal) understands as a color code, then it will print in that color until you reset the color to something else.