Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to stop command prompt windows from closing while using fortran

Status
Not open for further replies.

redbullah

Mechanical
Sep 26, 2015
2
hello, i'm pretty new to fortran (started using it today actually). i understand fortran doesn't have it's own gui, command prompts are used instead. however, i suffer from command prompt windows keep closing immediately the code is finished reading. how can i prevent this?
 
Replies continue below

Recommended for you

Did you open the command window independently? If you did, the program completion should behave as any other Windows command in that window.

TTFN
I can do absolutely anything. I'm an expert!
faq731-376 forum1529
 
Instead of stopping with STOP, stop with PAUSE followed by STOP.
 
I agree with IRstuff...

How do you start the program? do you double click on the executable and let it launch its own terminal?...if so, that's probably why it goes away as soon as the program terminates.

Try:
[ul]
[li]launching a DOS terminal by yourself, first[/li]
[li]add the path to the executable to PATH[/li]
[li]"[tt]cd[/tt]" to the working directory[/li]
[li]run program by typing name of executable[/li]
[/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor