🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2273

Re: MS-Fortran: filename from cmd line?

#2273
From: Chris Marriott
Date: Fri, 22 Jan 1993 18:38
42 lines
2281 bytes
In article <davidw.727655487@auck.irl.cri.nz> davidw@auck.irl.cri.nz writes:

>I recently upgraded to MS-Fortran 5.1, which can generate Windows
>programs. 
>
>I wish to associate the input files for my Fortran simulation with 
>the Windows .EXE file, AND get the input filename into the 
>simulation for character manipulation to generate corresponding 
>output filenames. 
>
>Eg, associate *.INP with SIMULATE.EXE. Now I want to be able to
>double-click on XYZ.INP (in FileManager) to run SIMULATE, opening
>XYZ.INP as input and generating XYZ.OUT for output. 
>
>My local Microsoft support provided information about accessing
>the PSP or PDB at the start of the app, and a Windows call:
>GetCurrentPDB(). Before looking into something that seems rather
>complex to me, has anyone solved this one already?
>
>david white                           davidw@auck.irl.cri.nz
>
>--
> david white    (engineer, Goon fan & son of my Dad)
> Internet davidw@auck.irl.cri.nz  Fax +64 9 443-4737
>

I've converted quite a number of FORTRAN codes to run under Windows.
My advice would be to convert your main program to a SUBROUTINE, and
add a small front end program in C which calls the FORTRAN code. That
way you can use all the standard C command-line parsing stuff.

Best wishes,

Chris
-- 
--------------------------------------------------------------------------
| Chris Marriott                           | chris@chrism.demon.co.uk    |
| Warrington, UK                           | BIX: cmarriott              |
|                                          | CIX: cmarriott              |
| Save the whales.  Collect the whole set. | CompuServe: 100113,1140     |
--------------------------------------------------------------------------
 
Technical Details
Message-ID: <727727885snz@chrism.demon.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
References: <davidw.727655487@auck.irl.cri.nz>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
From: chris@chrism.demon.co.uk (Chris Marriott)
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
Subject: Re: MS-Fortran: filename from cmd line? 
Distribution: world
References: <davidw.727655487@auck.irl.cri.nz>
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Lines: 42
Date: Fri, 22 Jan 1993 18:38:05 +0000
Message-ID: <727727885snz@chrism.demon.co.uk>
Sender: usenet@demon.co.uk