Synopsis
INTEGER FUNCTION ARRFalloc (N1,
. number_of_elements,
. N2)
INTEGER N1, N2
INTEGER type, number_of_elements
Description
For a complete description of this function, see ARRalloc.
Arguments
type
An integer code specifying the data type for which to allocate memory. All type codes are predefined in the include file omf.inc . The meaningful codes in the FORTRAN context are:
Code
|
Allocate memory for...
|
DTYPE_INT |
Integer |
DTYPE_FLOAT |
Single-precision floating point |
DTYPE_DOUBLE |
Double-precision floating point |
number_of_elements
The number of elements to be stored in the allocated memory, expressed as an integer.
N1
N2
Both N1 and N2 should be set to 0.
Returned value
The address of the allocated memory area or 0 if the call fails.
Example
#include <avs/omf.inc>
INTEGER iaddr
...
iaddr = ARRFalloc(0,DTYPE_FLOAT,2000,0)
IF (iaddr .EQ. 0) PRINT*,'Error allocating memory area'
See also
Related modules: