|
From: | Marco2008 |
Subject: | Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size |
Date: | Mon, 13 Oct 2008 12:01:26 -0700 (PDT) |
dbateman wrote: > > I've done quite a bit of F77 programming in my time and the declaring a > variable with "SAVE" allows its value to be stored between invocations > of a function. Can't you arrange that the precalculated values are > stored and reused on the second call? > > D. > Thanks for the hint. I tried it with simple integer and real variables as well as with arrays of fixed size and it has worked well. But the SAVE attribute does not work with arrays of dynamic size: INTEGER, SAVE :: k1(:) ! does not work I am not sure if there is another trick to use SAVE and arrays with unknown size anyway. I tried something with a saved pointer. It compiled but some values of the array had changed in the second call. Marco -- View this message in context: http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19960787.html Sent from the Octave - General mailing list archive at Nabble.com.
[Prev in Thread] | Current Thread | [Next in Thread] |