Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new question: generate system even in Fortran?

Status
Not open for further replies.

ctlin

Technical User
Apr 17, 2002
77
0
0
US
i'm trying to build a GUI front end for a fortran program.

is there such thing as having a Fortran program trigger a system event at certain points during execution and having another program(VisualBasic) respond to those events? what i need is a way for VB to know when it needs to send input to Fortran. Thanks in advance
 
May be you can use the SendMessage or PostMessage function (windows API) to send previously registred message(s) to the calling process. I work with this since several years with Delphi GUI applications that calls fortran DLLs and when i want that the GUI refresh values i use the SendMessage function.
 
I never use visual basic and things like this, but have made
a similar interface using perl Tk.
This means I have a driver code(the GUI) in perl Tk,
which among other things computes dimensions for
dimensioning the fortran arrays, then parses the code and
replaces the PARAMETER statements used in the dimension statements by what they should be, compiles the code
and runs it(all these are done via system calls,e.g.
system ("fortran_code.e") or system("fortran_code.exe") if you use windows, returning control to the gui when the code
finishes. In this approach the tricky part is passing datastructures between perl and fortran(e.g. arrays). A simple solution is to write them to ascii files and read them as such. To have the gui triggered by the
fortran code should also be possible, e.g. the gui looks for the existence of a file produced by the existence of a file created by the fortran code.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top