stdout ACCESS='STREAM'
George Wyche
g@cjwyche.org
Mon Jun 8 03:09:00 GMT 2015
This is about ditching depending on c's
printf("%s",my_partial_byte_text);.
I am back again with hat in hand. (Pass on by if you haven't got 2 cents.)
How am I supposed to get to use
WRITE(*,'(A)') my_character_text
wherein * is ACCESS='STREAM' ? All I get is 'SEQUENTIAL'.
I'd like direct (oblique) suggestions,
but I will consider carefully what I do get.
The sequence below is 33 lines captured (mostly) with script.
scan@debian:~$ export BASH_VERSION
scan@debian:~$ GFORTRAN_BUFFERED_PRECONNECTED="yes"
scan@debian:~$ export GFORTRAN_BUFFERED_PRECONNECTED
scan@debian:~$ make probaccess
gfortran -I../lib/mod/ -std=gnu -Wall -W -o probaccess.exe probaccess.f95
scan@debian:~$ ./probaccess.exe
This program was compiled by GCC version 4.9.1 using the options -I
../lib/mod/ -msecure-plt -Wall -Wextra -std=gnu
BASH_VERSION="4.3.33(1)-release"
GFORTRAN_BUFFERED_PRECONNECTED="yes"
6 = OUTPUT_UNIT, 0 =IOSTAT, and, T =EXIST
INQUIRE(OUTPUT_UNIT, IOSTAT=Stat, ACCESS=someChars) returns "SEQUENTIAL",
0 =Stat
scan@debian:~$ cat probaccess.f95
PROGRAM probaccess
USE ISO_FORTRAN_ENV ! compiler_{options|version}() OUTPUT_UNIT
IMPLICIT NONE
LOGICAL :: Ex
CHARACTER(LEN=60) :: someChars
INTEGER :: Stat
PRINT '(4a)', 'This program was compiled by ',compiler_version(), &
' using the options ', compiler_options()
CALL GET_ENVIRONMENT_VARIABLE('BASH_VERSION',someChars)
PRINT *, 'BASH_VERSION="', TRIM(someChars), '"'
CALL GET_ENVIRONMENT_VARIABLE('GFORTRAN_BUFFERED_PRECONNECTED',someChars)
PRINT *,'GFORTRAN_BUFFERED_PRECONNECTED="',TRIM(someChars),'"'
INQUIRE (OUTPUT_UNIT, IOSTAT=Stat, EXIST=EX)
PRINT *,OUTPUT_UNIT,'= OUTPUT_UNIT,',Stat,'=IOSTAT, and, ', Ex,'=EXIST'
INQUIRE (OUTPUT_UNIT, IOSTAT=Stat, ACCESS=someChars)
PRINT *, 'INQUIRE(OUTPUT_UNIT, IOSTAT=Stat, ACCESS=someChars) returns "',&
TRIM(someChars),'", ',Stat,'=Stat'
END PROGRAM
More information about the Fortran
mailing list