This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Control-D not closing unit 5 in list-directed input
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Cc: John Nabelek <nabelek at coas dot oregonstate dot edu>
- Date: Sat, 26 Jan 2008 08:53:43 +0000
- Subject: Re: Control-D not closing unit 5 in list-directed input
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; bh=lGMV11obq67YMpZp+xlV4IDVsVm2IhQTQW6R4aDHpS0=; b=lotQQcwn2/ylEBIq0NJFQTzql67HCPYacm//Is063ZJtSl7fFEt0AguvO8fMTxfTql5hwflOisoY0YOqt/Qr8WTfcTuUmLLrlMuEBmHGrZVXuag+x6ywsJg1utxMgr7Rkqpkq7hdVyVtnVA+BewY7MZCkSZYs95cYYCdWuyOjQ0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=u2DscRoQNyGVXxTQN9MQwI4LVbguqt3oTkg6rFlsP5/VUCzrv4zl6SnkwV/QtXyjfdAuUCOo1sMDGXXjtO2A3bN33RnqrxeS4hXh9wyY5KPqg4Ezq5tFA072ht9n0HsNKMInne7S6eGerf4+2xj7us6/ImuSSaRPeuSNUYi8vCQ=
Hi John,
I don't know how that came to be, but I see a different behaviour
than others with a compiler dated 20071231 on Intel/MacOS 10.4: I
need to press ^D twice to get past the read statement. My output
looks thus like that:
[before I do anything]
$ ./a.out
Enter number1?
[after I hit ^D]
$ ./a.out
Enter number1?
^D
[after I hit ^D again]
$ ./a.out
Enter number1?
ios= -1
999
Enter number2?
Can you check if, in your case also, hitting ^D twice works? I
suspect the problem has been fixed between 20071231 and now...
FX
PS: $ gfortran -v
Using built-in specs.
Target: i386-apple-darwin8.10.1
Configured with: /tmp/gfortran-20071231/ibin/../gcc/configure --
prefix=/usr/local/gfortran --enable-languages=c,fortran --with-gmp=/
tmp/gfortran-20071231/gfortran_libs --enable-bootstrap
Thread model: posix
gcc version 4.3.0 20071231 (experimental) [trunk revision 131236] (GCC)