View previous topic :: View next topic |
Author |
Message |
erfejm
Joined: 25 Sep 2016 Posts: 7
|
Posted: Wed Sep 28, 2016 2:21 am Post subject: Output Window Closes after running |
|
|
Please help me. I cannot see the output of my codes anymore. Whenever I start run, it will display that linking and compiling is complete. Then the output window will open, but will close in less than a second. I have tried uninstalling and reinstalling Silverfrost but nothing happens. I really hope someone can help me. Thank you |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2556 Location: Sydney
|
Posted: Wed Sep 28, 2016 3:42 am Post subject: |
|
|
I am guessing you are running your program from within PLATO.
If this is the case, rather than letting the program exit, put a prompt to finish, such as:
write (*,*) 'Program has finished; prompt to exit'
read (*,'(i5)') n
stop
end
Alternatively, run your program outside of PLATO or put a few prompts in the program to report progress, using write (*,*) 'At this stage'
If you had a problem with the program, it should report something.
John |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Wed Sep 28, 2016 7:31 am Post subject: |
|
|
You will get this behaviour when running a console application from Windows Explorer or perhaps Visual Studio.
When using a Command Prompt window (DOS box) or Plato, you will be able to see your output. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Wed Sep 28, 2016 12:37 pm Post subject: |
|
|
If the output is in an old fashioned DOS box, then putting the "WINAPP" directive in the program will give a windows box which won't close on exist. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Wed Sep 28, 2016 1:00 pm Post subject: |
|
|
John
This is not an issue in Plato. The output is retained when you run a console application from Plato. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Fri Sep 30, 2016 11:33 am Post subject: |
|
|
oops sorry Paulmy mistook, I picked up from JohnC's assumption in his 1st comment which hadn't been confirmed not denied by the poster (who seems not too interested i nthe replies) |
|
Back to top |
|
|
erfejm
Joined: 25 Sep 2016 Posts: 7
|
Posted: Sat Oct 01, 2016 8:01 am Post subject: |
|
|
I tried all replies, but sadly, nothing happened . |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Sat Oct 01, 2016 9:22 am Post subject: |
|
|
Are you running your application from a Command Prompt window (DOS box)?
Is it a Windows application (using for example WINAPP) or a Console application?
Can you post a simple program that illustrates the problem? |
|
Back to top |
|
|
erfejm
Joined: 25 Sep 2016 Posts: 7
|
Posted: Sat Oct 01, 2016 10:34 am Post subject: |
|
|
All programs I run illustrates the problem, I run it using ctrl + f5 button. |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2556 Location: Sydney
|
Posted: Sat Oct 01, 2016 10:43 am Post subject: |
|
|
try the following program and see if you get any output Code: | write (*,*) 'Hello there'
end |
|
|
Back to top |
|
|
erfejm
Joined: 25 Sep 2016 Posts: 7
|
Posted: Sat Oct 01, 2016 11:39 am Post subject: |
|
|
Same thing, I start run, it will say "Compilation and linking complete", output window will open and closes almost immediately. |
|
Back to top |
|
|
erfejm
Joined: 25 Sep 2016 Posts: 7
|
Posted: Sat Oct 01, 2016 11:45 am Post subject: |
|
|
Is it possible that the error is related to the file "plato3.ini"? because it is located in my desktop. |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2556 Location: Sydney
|
Posted: Sun Oct 02, 2016 12:05 am Post subject: |
|
|
You are not getting far with this.
It is surprising that the hello world program does not appear to run.
Do you generate a .exe file ? If do, try opening a "DOS box" or Command Prompt and go to where the .exe is stored and try to run it. If that fails, you could have problems with the .exe, but you should get some error message at least.
The information you are providing is not very clear as to what the problem is. |
|
Back to top |
|
|
erfejm
Joined: 25 Sep 2016 Posts: 7
|
Posted: Sun Oct 02, 2016 1:05 am Post subject: |
|
|
Yes, there are .exe files generated. I tried opening a DOS box and running hello.exe, same thing happened, but there were no error messages. But when I ran a pogram that gets the BMI of a person, it asks for information and when it will print the BMI, the output box closes. |
|
Back to top |
|
|
|