home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!microsoft!hexnut!joero
- From: joero@microsoft.com (Joe Robison)
- Subject: Re: Using VB+Fortran
- Message-ID: <1992Sep01.061423.9818@microsoft.com>
- Date: 01 Sep 92 06:14:23 GMT
- Organization: Microsoft Corp.
- References: <16294@ucdavis.ucdavis.edu>
- Lines: 39
-
- In article <16294@ucdavis.ucdavis.edu> JRBANGA@poppy.ucdavis.edu wrote:
- >
- > Hi everybody.
- >
- > I'm trying to give a GUI to some scientific Fortran programs.
- > I'm thinking of using MS Visual Basic in combination with MS Fortran.
- >
- > Has anyone gone through the same experience?
- > Any advice/comments/references?
- > Anything I should be aware of?
- >
- > Is there a better way to do this?
-
- This is the right approach. It works quite well.
- You compile your Fortran code as a Windows DLL (this is documented in
- the latest version of Microsoft Fortran). Build the UI in Visual
- Basic, declare the functions exported in the DLL, and call them.
- I've never actually done the Fortran side of this, but I've helped
- several people who have. The only tricky part is (as usual) getting
- the Declare statements in Visual Basic to match up with what the
- Fortran functions are expecting. It's not hard if you carefully
- think through what you're actually passing (or expecting to be
- passed) for each argument. The floating point format is identical
- for the two languages, so that helps.
-
- There was an article on this in the Microsoft Systems Journal,
- about a year ago (summer of 91). Also, I believe Microsoft
- Fortran actually includes an example file that does this.
- Some of the more engineering-oriented journals have run articles
- about this as well (sorry, I don't remember titles or dates).
-
- Hope this helps.
-
- --
- Joe Robison
- joero@microsoft.com
- Not A Microsoft Spokeshuman
-
-
-