Different Colored Words in FORTRAN Output?

  • Context: Fortran 
  • Thread starter Thread starter gmcke1
  • Start date Start date
  • Tags Tags
    Fortran Output
Click For Summary
SUMMARY

To achieve different colored words in FORTRAN output, users can utilize subroutine libraries compatible with their terminal and operating system, such as the "curses" library. Alternatively, users can implement ANSI escape codes directly in their print/write statements to control text color. This method requires a solid understanding of ANSI escape codes, which are widely supported across various text terminal windows.

PREREQUISITES
  • Familiarity with FORTRAN programming language
  • Understanding of terminal output and its capabilities
  • Knowledge of ANSI escape codes
  • Experience with subroutine libraries, specifically "curses" in C
NEXT STEPS
  • Research how to implement ANSI escape codes in FORTRAN output
  • Explore the "curses" library documentation for terminal manipulation
  • Learn about terminal color support across different operating systems
  • Investigate other libraries or frameworks that enhance FORTRAN output
USEFUL FOR

FORTRAN developers, software engineers working with terminal applications, and anyone interested in enhancing text output with color in programming 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

Similar threads

  • · Replies 59 ·
2
Replies
59
Views
12K
  • · 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
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
18K