home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5297 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  2.1 KB

  1. Path: sparky!uunet!comp.vuw.ac.nz!zephyr.grace.cri.nz!totara.auck.irl.cri.nz!davidw
  2. From: davidw@auck.irl.cri.nz (David White)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: SOLVED! (Was: MS-Fortran: filename from cmd line?)
  5. Date: 23 Jan 93 09:47:49 GMT
  6. Organization: Industrial Research Ltd, Auckland, New Zealand
  7. Lines: 37
  8. Message-ID: <davidw.727782469@auck.irl.cri.nz>
  9. References: <davidw.727655487@auck.irl.cri.nz> <727727885snz@chrism.demon.co.uk>
  10. NNTP-Posting-Host: totara.auck.irl.cri.nz
  11.  
  12. In <727727885snz@chrism.demon.co.uk> chris@chrism.demon.co.uk (Chris Marriott) writes:
  13.  
  14. >In article <davidw.727655487@auck.irl.cri.nz> davidw@auck.irl.cri.nz writes:
  15.  
  16. >>I recently upgraded to MS-Fortran 5.1, which can generate Windows
  17. >>programs. 
  18. >>
  19. >>I wish to associate the input files for my Fortran simulation with 
  20. >>the Windows .EXE file, AND get the input filename into the 
  21. >>simulation for character manipulation to generate corresponding 
  22. >>output filenames. 
  23. >>
  24. >>Eg, associate *.INP with SIMULATE.EXE. Now I want to be able to
  25. >>double-click on XYZ.INP (in FileManager) to run SIMULATE, opening
  26. >>XYZ.INP as input and generating XYZ.OUT for output. 
  27. >>
  28. >>My local Microsoft support provided information about accessing
  29. >>the PSP or PDB at the start of the app, and a Windows call:
  30. >>GetCurrentPDB(). Before looking into something that seems rather
  31. >>complex to me, has anyone solved this one already?
  32.  
  33. >I've converted quite a number of FORTRAN codes to run under Windows.
  34. >My advice would be to convert your main program to a SUBROUTINE, and
  35. >add a small front end program in C which calls the FORTRAN code. That
  36. >way you can use all the standard C command-line parsing stuff.
  37.  
  38. In case anyone else was wondering what the simple answer was... Even
  39. after trying to RTFM, and try local MS-Support... it was in the manual!
  40. (Shows how bad the index is.) There is a function called GETARG in 
  41. MS-Fortran to do it. No need for anything fancy or tricky.
  42.  
  43. Thanks to bongo@dialix.oz.au ?? from the Univ of Western Australia for 
  44. the pointer.
  45.  
  46. --
  47.  david white    (engineer, Goon fan & son of my Dad)
  48.  Internet davidw@auck.irl.cri.nz  Fax +64 9 443-4737
  49.