Software Archive
Read-only legacy content
17061 Discussions

Redirecting C stdout,stderr to Fortran Unit 6

jcbreeding
Beginner
250 Views
I am porting legacy code that is mixed Fortran and C. I have set up a scrollable Quickwin window in Fortran and opened it as Unit 6 (file="USER") for use as a console for prompts, text display and accepting user instructions.. On the C side I have hundreds of statements that write output to either stdout or stderr, using fprint, that I need to redirect to unit 6. Is there any relatively simple way to do this? I have read previous discussions regarding pipes and USEROPEN and am more confused than before.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
250 Views
No simple way. The only thing I can think of is to use pipes, but that requires some additional programming. USEROPEN isn't helpful to you here. The ONLY way that data gets into a QuickWin window is through Fortran I/O.

Steve
0 Kudos
Reply