[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FORTRAN common blocks



On Tue, Jan 17, 2006 at 11:12:25AM +1100, Russell Shaw wrote:
> I haven't found anything i can't do in C easily. I couldn't imagine using
> a language without pointers. Instead of copying 100x100 arrays by value as
> a function parameter, i can just pass a pointer to it.

All arguments are passed by reference in Fortran.

> After looking at some papers on how to solve equations fast where the
> matrices are sparse, it occured to me that the authors were misguided
> by a pointerless language. Using pointers, i made a program to solve
> problems with sparse matrices as one would "by hand", which eliminates
> all kinds of possible numerical problems with "traditional" methods.

Not sure what you are saying here. Numerical methods for handling sparse
matrices require the use of indirect addressing no matter what the language
supports as the point (pun not intended) is to not have to store a complete
matrix. Whether you have pointers or fake them using a vector of indices
makes no difference to the algorithm and to the actual performance. I would
be interested in knowing how different your implementation is!

In any case, Fortran > 90 has pointers.

cheers,
eric
-- 
 Eric S. Fraga, Department of Chemical Engineering, UCL, London
............*******.*..**.*.*...***.***.*...*...***.*...........



Reply to: