[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size
From: |
Jaroslav Hajek |
Subject: |
Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size |
Date: |
Mon, 13 Oct 2008 21:48:37 +0200 |
On Mon, Oct 13, 2008 at 9:37 PM, David Bateman <address@hidden> wrote:
> Marco2008 wrote:
>>
>> 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.
>
> Well SAVE is an F77 keyword and so this doesn't really surprise me.
F77 is a subset of F90. In F95, some obscure features are deleted, but
most F77 will still work, and the same holds for F2003.
> Isn't there a F90 keyword for static variables?
>
Yes, it's SAVE. The above doesn't work for a different reason
(deferred shape array must be POINTER or ALLOCATABLE).
> D.
>
> --
> David Bateman address@hidden
> 35 rue Gambetta +33 1 46 04 02 18 (Home)
> 92100 Boulogne-Billancourt FRANCE +33 6 72 01 06 33 (Mob)
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, (continued)
- Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, John W. Eaton, 2008/10/08
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Jaroslav Hajek, 2008/10/09
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Marco2008, 2008/10/10
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, David Bateman, 2008/10/10
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Marco2008, 2008/10/13
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, David Bateman, 2008/10/13
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size,
Jaroslav Hajek <=
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Jaroslav Hajek, 2008/10/13
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Marco2008, 2008/10/13
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Jaroslav Hajek, 2008/10/14
- Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size, Marco2008, 2008/10/16