Works perfectly! Thank you so much!
I didn't know about this kind of constructs at all (iterating without DO blocks). Can you tell me what they are called?
Hi,
LINV1F is not an intrinsic Fotran routine, neither in F77 nor in F90, so you will always need a library to use it.
Google immediately turns up http://ib.cnea.gov.ar/~fiscom/Libreria/imsl_old/linv1f.f, the source code for LINV1F. Looking at this file, it seems like it shouldn't be too hard...
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...
If you don't have a lot of mathematical knowledge then Fortran is probably the worst language you could use, since it is outdated and used almost exclusively in the field of mathematical/numerical algorithms.
Other languages like Java or C++ have lots of pre-built mathematical libraries...
I found the problem, there was a simple type mismatch (REAL/INTEGER) which I had not noticed before.
In fact, the behavior described (passing array elements and have them reinterpreted as array markers) works without problems in both f77 and f90.
Have a good day,
Matt
You need to use FORMAT statements, e.g. FORMAT('(A)') for a character string. Without such a statement, standard Fortran output starts with a blank for reasons I have never understood.
Cheers,
Matt
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.