PDA

View Full Version : RE: [LF] [LF digest] Adjustable dimensions


Lahey Support
08-15-2003, 01:24 AM
Dear Tom,

>b = a(1:n,1:n)
>call matinv(b)
>(matinv does not need the dimension of b, it can get it from the SIZE
>function)

Your example supports my original statement of February 8 dealing with the
benefits of the Fortran 90 (and 95) features compared with possibilities
from the "old days of Fortran IV". I wrote the following:

"Artificial example: if one wrote a subroutine for inverting submatrices of
large matrices, he had to "inform" the subroutine on the declared size of
the reserved memory segment..."

If this matrix inversion has to be made for n=2,3,4..., then the programmer
meets the alternative:
- to write the two lines shown above, OR
- to use the more complicated form written in my message.

Of course, I'll write two lines only.

Best regards,
Egon

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
SZONDI, Egon Janos [address removed]
Institute of Nuclear Techniques http://www.reak.bme.hu/~szondi
Technical University of Budapest
H-1521 Budapest, Hungary Tel: ++36-1 463-1563
Muegyetem rkp. 9. Fax: ++36-1 463-1954
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

--------------------------------------------------------------------------
To unsubscribe from Fortran Forum, send a message to [address removed]
with the following command as the first and only line of the message body:
unsubscribe fortran
--------------------------------------------------------------------------