Gfortran printing on cygwin?

  • Fortran
  • Thread starter kth
  • Start date
  • #1
kth
4
0
I use gfortran on cygwin and i want to print in the command window (like it prints in windows)
i use the usual stuff:

WRITE(6,*) 'Give a number:'

or

PRINT(6,*) 'Give a number:'

but the execution completes without any printing..

What is wrong?
 

Answers and Replies

  • #2
mathmate
365
0
Does the 'black window' stays on the screen without printing anything, or does it disappears without giving you time to read what's on it?

In the former case, we will need more information.

In the latter case, it is probably because the window shuts down at the end of the execution unless you put a command to halt the closing, such as requesting user to enter a key to continue.
 
  • #3
kth
4
0
When i use the command

./ a.exe it prints int the command window

but when i use

run a.exe it does not print

I wonder whats the difference between those commands?
 
  • #4
mathmate
365
0
I do not have a Linux system to verify the explanation, but I believe the run command opens a new shell so printing is displayed in a different process distinct from where you entered your command "run...". On the other hand, a.exe is executed in the command screen, so you get to see the output.
 

Suggested for: Gfortran printing on cygwin?

  • Last Post
Replies
6
Views
14K
Replies
13
Views
917
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
4
Views
4K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
0
Views
3K
  • Last Post
Replies
3
Views
11K
  • Last Post
Replies
4
Views
481
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
2
Views
16K
Top