For Programmers: Free Programming Magazines  


Home > Archive > Fortran > April 2005 > Opening an *.exe program from within my fortran code









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Opening an *.exe program from within my fortran code
docterryt

2005-04-25, 3:58 am

How do I run a *.exe program from within my fortran code?

What would the lines of code look like?

Also, how can open the command prompt from within my source code.

docterry

Ken Plotkin

2005-04-25, 8:58 am

On 24 Apr 2005 19:50:14 -0700, "docterryt" <docterryt@adelphia.net>
wrote:

>How do I run a *.exe program from within my fortran code?
>
>What would the lines of code look like?
>
>Also, how can open the command prompt from within my source code.
>
>docterry


It would help if you said what compiler and system you're using.

For spawning another program, look through your manual for a command
like "system", "spawn" or "execute." Probably with some other letters
thrown in to give a system-ish feel to the name.

For reading the command line, look for a command like "getarg" or
"iargc." Something with "arg" in it.

Ken Plotkin

docterryt

2005-04-26, 4:01 am

I'm running Absoft Pro 7.5 in Windows XP Pro. I look through my manual
and see what I can find.

Thanks

David Flower

2005-04-26, 8:59 am

Two points:

Be aware that some intrinsics will start another process, and wait for
its completion, whilst others will start another process and
immediately return

Secondly, can anyone do this for a Lahey .NET compiler (either way) or
g77 (immediate return)

Jim

2005-04-27, 3:58 am


"docterryt" <docterryt@adelphia.net> wrote in message
news:1114397414.277309.60750@o13g2000cwo.googlegroups.com...
> How do I run a *.exe program from within my fortran code?

By using the system calls that the operating system provides. This is
highly system specific.
Jim


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com