In my code, I declare a large list of fixed-length character strings:
CHARACTER * 256 :: string_list(256)
The ancient problem is that if I was to output such a string, it is always filled with spaces, no matter what its actual contents are:
string_list(1) = 'test'
WRITE(*,'(A)')...
Is there any way to read an entire file into an ALLOCATABLE buffer in Fortran? Say I have the code
CHARACTER, DIMENSION(:), ALLOCATABLE :: file_buffer
file_size = get_file_size(filename)
ALLOCATE(file_buffer(file_size))
What needs to happen afterwards to read the entire file "file_name" into...
I've converted a program from f77 to f90 syntax and am now getting errors of the type "The type of the actual argument differs from the type of the dummy argument" with Intel Visual Fortran 10.
The code from where the errors originate has the following structure:
SUBROUTINE routine1(w)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.