Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29250 Discussions

fortran dll from VB and msdos "debugging"window

mauri72
Beginner
669 Views
Hi there, my research group has traditionally been working with lahey f90 fortran compiler, which in my humble opinion is the worst compiler I had the misfortune to work with, but it had a "nifty" feature (at least for our purpose).
During compilation of the fortran dll I could specify a -win flag, whichallowed meto use print statements in the fortran code, for example to print values of certain variables on a msdos screen in the backgroundduring the execution of the DLL from the visual basic main part of the program. This made much simpler our debugging process.
Now I have managed converting our dll so that compaq visual fortran compiles it correctly and the vb code runs smoothly with it....but is there any way i could get that msdos window (or something similar)back?
Thanks in advancefor your help
Maurizio
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
669 Views

USE DFWIN

i = AllocConsole() !Creates a console

!Your code with print * here

i = FreeConsole() !Destroys the console

See also: OutputDebugString.
Jugoslav
0 Kudos
mauri72
Beginner
669 Views

hey thanks a lot!! :)

and thanks to the console window I found out that the values of the variables passed by VB to the DLL do not match with the same DLL created with lahey....bummer...back to the drawing board!!

Maurizio
0 Kudos
Reply