Re: IDL and C interface [message #10188 is a reply to message #10134] |
Thu, 30 October 1997 00:00  |
Richard D. Hunt
Messages: 8 Registered: January 1996
|
Junior Member |
|
|
Ettore Lopinto wrote:
>
> Hello everyone!
> Does anybody know how to call the IDL function "MAKE_ARRAY" from a C
> routine? I just need to know the proto of the C function "IDL_MakeArray"
> which should allocate an IDL array. I was unable to find it in the
> export.h file which comes with IDL distribution.
> Tks
> Antonio Giancaspro
>
> plase answer to the list, or prefereably to
> TOOLBOX@NETSYSTEM.IT
> or
> MC0486@MCLINK.IT
I think you want IDL_MakeTempArray(). It should be in the advanced
manuals.
char * IDL_MakeTempArray(int type, int n_dim, IDL)LONG dim[], int init,
IDL_VPTR *var);
type: One of the IDL types (e.g. IDL_TYP_LONG)
n_dim: number of array dimesions.
dim: array specifying the number of elements in each dimension.
init: what type of initialization (e.g. IDL_BARR_INI_ZERO)
var: address of resulting array.
The return pointer of this call is the address of the data locations
pointed to by "var". This gives you an easy way to fill the array
without having to perfomr a bunch of indexing.
--
Richard D. Hunt
_/_/_/ _/ _/ _/ SANDIA NATIONAL LABORATORIES
_/_/_/
_/ _/_/ _/ _/ P.O. Box 5800 M/S 0965 _/_/
_/_/_/ _/ _/ _/ _/ Albuquerque, NM 87185-0965
_/_/_/_/_/_/
/ _/ _/_/ _/ Voice: (505)844-3193 _/ _/_/
_/
_/_/_/ _/ _/ _/_/_/_/ Fax: (505)844-5993 _/ _/_/
_/
E-Mail: rdhunt@sandia.gov _/_/_/
|
|
|