ghenniga@nmsu.edu (Gary Hennigan) (08/10/90)
Hello, I have a problem I hope someone out there can help with. I have MS FORTRAN v5.00 at home on my PC and was wondering if it is possible to do DOS level calls from within my FORTRAN code, specifically what I would like to do is be able to do a CD from within my code and possibly run some external executables such as PKZIP. I'm an "old hand" at FORTRAN programming but have never had to try to do interaction with system level calls from within FORTRAN. I realize this is a jump for FORTRAN but since my main thrust is in numerical analysis of EE problems I found FORTRAN to be my best choice and only have room for either FORTRAN or C on my hard disk so I of course chose FORTRAN. Any help, even to tell me NO WAY, would be appreciated! Thanks, -- Gary Hennigan +---------------------------------------------------------------------------+ + e-mail: ghenniga@NMSU.Edu, henninsf@maxwel.NMSU.Edu + + Department of Electrical Engineering, Grad Student + + Physical Science Laboratory (ASS)istant systems programmer + +---------------------------------------------------------------------------+
jwhite@dtoa3.dt.navy.mil (White) (08/10/90)
In article <GHENNIGA.90Aug9233707@tesla.nmsu.edu> ghenniga@nmsu.edu (Gary Hennigan) writes: >Hello, > > I have a problem I hope someone out there can help with. I have MS >FORTRAN v5.00 at home on my PC and was wondering if it is possible to >do DOS level calls from within my FORTRAN code, specifically what I >would like to do is be able to do a CD from within my code and >possibly run some external executables such as PKZIP. I'm an "old >hand" at FORTRAN programming but have never had to try to do >interaction with system level calls from within FORTRAN. > I realize this is a jump for FORTRAN but since my main thrust is in >numerical analysis of EE problems I found FORTRAN to be my best choice >and only have room for either FORTRAN or C on my hard disk so I of >course chose FORTRAN. > >Any help, even to tell me NO WAY, would be appreciated! > >Thanks, >-- >Gary Hennigan Hello, Microsoft Fortran Version 5.00 (ver 4.0+, actually) has the C functions 'system' and spawnlp' buiilt in to is libraries (assumming you did not require C compatability?). These will give you what you need, The required information is buried in Section 4.2.5 (page 86) of the Advanced Topics book. They also include a demonstration program DEMOEXEC.FOR that gives examples on using these routines. I'm not suprised that you could not find this info, I knew about it from a upgrade flyer for Version 4.01 and I think that they should have placed this information with the other additional procedures in the reference book. Hope this helps you and anyone else that needs this info; Joe White jwhite@dtoa3.dt.navy.mil I don't work for Microsoft, I just use their product in this instance