home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5281 < prev    next >
Encoding:
Text File  |  1993-01-23  |  2.2 KB  |  57 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. From: chris@chrism.demon.co.uk (Chris Marriott)
  3. Path: sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
  4. Subject: Re: MS-Fortran: filename from cmd line? 
  5. Distribution: world
  6. References: <davidw.727655487@auck.irl.cri.nz>
  7. Organization: None
  8. Reply-To: chris@chrism.demon.co.uk
  9. X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
  10. Lines: 42
  11. Date: Fri, 22 Jan 1993 18:38:05 +0000
  12. Message-ID: <727727885snz@chrism.demon.co.uk>
  13. Sender: usenet@demon.co.uk
  14.  
  15. In article <davidw.727655487@auck.irl.cri.nz> davidw@auck.irl.cri.nz writes:
  16.  
  17. >I recently upgraded to MS-Fortran 5.1, which can generate Windows
  18. >programs. 
  19. >
  20. >I wish to associate the input files for my Fortran simulation with 
  21. >the Windows .EXE file, AND get the input filename into the 
  22. >simulation for character manipulation to generate corresponding 
  23. >output filenames. 
  24. >
  25. >Eg, associate *.INP with SIMULATE.EXE. Now I want to be able to
  26. >double-click on XYZ.INP (in FileManager) to run SIMULATE, opening
  27. >XYZ.INP as input and generating XYZ.OUT for output. 
  28. >
  29. >My local Microsoft support provided information about accessing
  30. >the PSP or PDB at the start of the app, and a Windows call:
  31. >GetCurrentPDB(). Before looking into something that seems rather
  32. >complex to me, has anyone solved this one already?
  33. >
  34. >david white                           davidw@auck.irl.cri.nz
  35. >
  36. >--
  37. > david white    (engineer, Goon fan & son of my Dad)
  38. > Internet davidw@auck.irl.cri.nz  Fax +64 9 443-4737
  39. >
  40.  
  41. I've converted quite a number of FORTRAN codes to run under Windows.
  42. My advice would be to convert your main program to a SUBROUTINE, and
  43. add a small front end program in C which calls the FORTRAN code. That
  44. way you can use all the standard C command-line parsing stuff.
  45.  
  46. Best wishes,
  47.  
  48. Chris
  49. -- 
  50. --------------------------------------------------------------------------
  51. | Chris Marriott                           | chris@chrism.demon.co.uk    |
  52. | Warrington, UK                           | BIX: cmarriott              |
  53. |                                          | CIX: cmarriott              |
  54. | Save the whales.  Collect the whole set. | CompuServe: 100113,1140     |
  55. --------------------------------------------------------------------------
  56.  
  57.