home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1612 < prev    next >
Encoding:
Text File  |  1992-08-31  |  1.8 KB  |  50 lines

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