[Bug fortran/60596] Inquire size for stream zero
jvdelisle at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 20 04:28:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60596
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu.org
--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Do it like this:
close(input_unit)
open(unit=input_unit, file="/dev/stdin", access='stream')
inquire(unit=input_unit,size=sz)
print *, sz
close(input_unit)
The name of the file needs to be whatever its called on your system.
$ gfc simple.f90
$ ./a.out <rvcomp.f90
400
0
3112
For the unit number , it does not have to be 5 for this.
More information about the Gcc-bugs
mailing list