Variable Size arrays Was: Indeterminate arrays?? 
Author Message
 Variable Size arrays Was: Indeterminate arrays??


->I'm not sure if my subject uses the correct words.  Anyway, is there
->a way in fortran 77 to make arrays as big as needed?  In C you can
->just use array[] for an array of indeterminant size.  Is this possible with
->Fortran?

        No.

        Ravi Sundaram
        UTA
        Aero



Mon, 29 Jul 1996 09:09:36 GMT  
 Variable Size arrays Was: Indeterminate arrays??

Quote:


>->I'm not sure if my subject uses the correct words.  Anyway, is there
>->a way in Fortran 77 to make arrays as big as needed?  In C you can
>->just use array[] for an array of indeterminant size.  Is this possible with
>->Fortran?

>       No.

It appears that the original poster is asking whether Fortran
subroutines can, in C lingo, accept pointers to arrays of size unknown
at compile time.

If that is the case, the answer is yes.

        int myfunc(int array[][N][M])
corresponds quite nearly to
        integer function myfunc(array)
        integer array(M,N,*)
assuming that M and N are suitably defined as constants in the C code.
--  --  --  --  --  -+-   --  --  --  --  --  --  --  -+-  --  --  --  --  --

UCO/Lick Observatory | Yep, that's me.  6 up for       |   +1 408 459 3046
Santa Cruz, CA 95064 | Orange in Bloom, Sherborne, eh? |   Seabright Morris



Mon, 29 Jul 1996 16:52:39 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Array Selection Start / Array Selection Size

2. Numerical Python array math with different sized arrays

3. Array intrinsics with zero-size array argument

4. Array performance degrades as array size increases

5. Variable array size in haskell

6. PL/I and recursion and variable-size local arrays

7. Beginer problem: variable array size

8. PL/I and recursion and variable-size local arrays

9. Abstraction of variable size arrays - Help !!!

10. sharing data arrays of variable size

11. variable-sized array

12. Array size by module variables

 

 
Powered by phpBB® Forum Software