Fortran Different Colored Words in FORTRAN Output?

  • Thread starter Thread starter gmcke1
  • Start date Start date
  • Tags Tags
    Fortran Output
Click For Summary
In the discussion, a user inquires about displaying different colors for each word in a FORTRAN print/write statement. The response suggests two approaches: the easier method involves using a subroutine library compatible with the terminal and operating system, such as the "curses" library, which is primarily in C. The more complex method requires understanding ANSI escape codes, which can be directly written to the terminal output to achieve colored text. These codes are generally effective in most text terminal environments.
gmcke1
Messages
9
Reaction score
0
Hello all FORTRAN geeks and geekettes,

I was wondering if there is a way to get different colors for each word in a print/write statement?

For example:
WRITE(*,*)'This is my test sentence'

Can I get each word in this write statement to appear as a different color in the terminal window?

Thanks a bunch :D

-Glenn Mckeever
 
Technology news on Phys.org
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 59 ·
2
Replies
59
Views
11K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
9K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
9
Views
2K