View previous topic :: View next topic |
Author |
Message |
Hicham
Joined: 03 Jan 2007 Posts: 5 Location: TX, USA
|
Posted: Thu Mar 08, 2007 7:35 am Post subject: Visual Studio Problems |
|
|
Hi
Can anyone show me how I can actually RUN my program [.exe file] that I generate after building my code under WIN32 environment using VS05? I know that is easily done from the command line, or in PLATO, but it seems it not the same in VS05. I tried using the COMMAND WINDOW by sending its output to the OUTPUT WINDOW PANE, but was getting some error message.
Thanks _________________ Hicham
Good Things Take Time! |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Thu Mar 08, 2007 8:15 am Post subject: |
|
|
The usual way is via F5 or Ctrl+F5 or by selecting an item in the Debug menu. I am not sure if Visual Studio provides a pause when the program has finished. If not then you can either put PAUSE in your code or run the program from your own Command Prompt window. |
|
Back to top |
|
|
Hicham
Joined: 03 Jan 2007 Posts: 5 Location: TX, USA
|
Posted: Sat Mar 10, 2007 1:59 am Post subject: |
|
|
Could you please show me an example of how to embed PAUSE within a program? I tried searching the FTN help menu for PAUSE, but got no hits.
Thanks _________________ Hicham
Good Things Take Time! |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Sat Mar 10, 2007 8:28 am Post subject: |
|
|
PAUSE is a standard Fortran statement (I think it has been there from the beginning). Optionally it can be followed by a literal character string.
It should be placed after the last execuable statement for each path in your code.
PROGRAM main
PRINT*,"Hello world"
PAUSE "Press any key to continue"
END |
|
Back to top |
|
|
|