HTH...
> I am using MSVB 6 and Digital fortran 5
> Perhaps another possible solution would be to be able to pass arguments
> to the fortran program?
> I use the following command in VB to execute the fortran excutable
> Shell(currentdir + "Carda.exe ", 2)
> ------------------------------------the VB subroutine where it is used ----
> Private Sub run_button_Click()
> Dim reponse
> openmode% = savefile
> filenum% = 1
> Call save_geo(currentdir + "GEOM.DAT", openmode%, filenum%)
> Call save_ctrl(currentdir + "CTRL.DAT", openmode%, filenum%)
> Call save_opera(currentdir + "OPERA.DAT", openmode%, filenum%)
> reponse = Shell(currentdir + "Carda.exe ", 2)
> ----------------------------------------------------end------------------
> here currentdir is where the program is run from.
> Here Carda.exe is the fortran executable. I want to pass two arguments
> to Carda.exe, let's say date and hostid? How can I do that? This will be
> another solution to my problem.
> Thanks for any help in this regards.
> Farooq
> > > > I have a VB program that prepares all necessary
> > > > inputs for a Fortran executable file. But in this way
> > > > I have two executables: a VB one and a fortran one.
> > > > Is there a way to combine the two to make a single
> > > > executable? Can I link the fortran object code to a
> > > > VB project? If yes, how?
> > > > Thanks for any help in this regards.
> > > > Farooq
> > > I've not seen that done. I doubt the fortran obj could be linked to a
> > > VB project.
> > > You could recode the fortran program into the VB one (or vice-versa)
> > > if you have the source code. You could leave it as 2 exes but have
> > > the VB 'control' the fortran one by shelling.
> > > Good luck.
> > It <can> be done by turning the Fortran code into a dll or linking with
> > explicit interfaces.
> > You don't say whose compiler(s) nor what data structures you are using,
> > so I don't have any way to provide further real details. If using the
> > MS or CVF compilers, see reference manual on interlanguage
> > programming...there are good examples of most interfaces. (BTW, it is
> > <possible> to use Fortran as the main program, but <much> more difficult
> > than the other way 'round, so you'll only find examples with VB as the
> > main program.)
> > HTH, and post with further details if desired, I'll be happy to try to
> > help...
> --
> Assalaamu Alaikum
> Wa alaikum assalaam
> Regards
> Farooq Saeed
> __________________________________________
> Office: cole Polytechnique de Montral
> Dpartment de Gnie Mcanique
> C. P. 6079, succ. Centre-ville
> Montral (Qubec), Canada
> H3C 3A7
> (514) 340-4711 ext. 5870
> Fax: (514) 340-5917
> WWW: http://www.meca.polymtl.ca/farooq/
> Home: 5335 Patricia ave., Apt. B,
> Montral (Qubec), Canada
> H4V 1Z1
> (514) 484-5309
> __________________________________________