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
Output Window Closes after running
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
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.
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.
John
This is not an issue in Plato. The output is retained when you run a console application from Plato.
I tried all replies, but sadly, nothing happened 😦.
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?
All programs I run illustrates the problem, I run it using ctrl + f5 button.
try the following program and see if you get any output write (,) 'Hello there' end
Same thing, I start run, it will say 'Compilation and linking complete', output window will open and closes almost immediately.
Is it possible that the error is related to the file 'plato3.ini'? because it is located in my desktop.
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.
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.
There seems to be an exception though, whenever I run an .exe file that ask the user if they want to use the program again, the program runs normally.
Program Fibonacci
Integer :: n, m
11 Print*, 'Please input a number'
Read*, n
m = 0
o = 1
print*, o
z = n-1
Do i=1, z
t = m + o
m = o
o = t
print*, t
End do
write (*,*) 'Program has finished; prompt to exit'
12 Print*, 'Do you want to use the program again? enter 1 for yes and 2 for no'
Read*, ans
!If user input values other than 1 and 2 then input error
If (ans > 2 .or. ans < 0 ) Then
Print*, 'Error'
GoTO 12
!Else send then back to the start
Else If (ans == 1) then
Go TO 11
Else
Print*, 'Thank you for using my program!! :)'
End if
End program Fibonacci