Where do I see default logical unit output?

Where do I see default logical unit output?

I'm sure this is a FAQ if I knew where to look...

On Windows XP, using IVF 9.0 from a GUI application written in C++, where do the default logical units put their text? If I write

print *,...

where can I see the output? I don't see anything in the Visual Studio Output window, where debugging information goes. I tried running my app from the command line, and I still didn't see any output.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Jugoslav Dujic's picture

Nowhere. You can call AllocConsole() API from either C++ or Fortran to create a console if there isn't one. Redirection to file will also work, but I don't think it can be specified in the command line while debugging (redirection using ">" is property of command-line interpreter rather than process itself).

Jugoslav www.xeffort.com

Jugoslav:

Thanks! I hadn't ever run across AllocConsole() because our application already has a way to show messages from C code.

As a logical follow-up, is there a way to connect a logical unit to a string? That would allow me to collect messages from my Fortran code and return it to the calling C++ code.

Jugoslav Dujic's picture

You can't connect it to a string, but you can to a pipe, which can be read on C++ side (you might nead a separate thread or process if you want to read it and display interactively, as soon as it is written). I posted pipes.zip example here recently. This thread might also be interesting.

Jugoslav www.xeffort.com

Login to leave a comment.