IDL nested structures in Callable IDL [message #44129] |
Thu, 19 May 2005 04:39 |
jicicuendez
Messages: 12 Registered: November 2001
|
Junior Member |
|
|
Hi everybody,
I am trying to create a IDL nested structure from C and I am going a
bit nuts because I can't find the way. The application fails when I
try cDef=IDL_MakeStruct(NULL,cTags). I am trying to create an
equivalent of:
data={N_ITEMS:2, DATA1:data1, DATA2:data2}
where data1 and data2
data1={x:dblarr(numberPoints1), y:dblarr(numberPoints1)}
data2={x:dblarr(numberPoints2), y:dblarr(numberPoints2)}
just only trying to include data1
static IDL_MEMINT dataInDims[]={1,1};
static IDL_MEMINT x_dim[] = {1,numberPoints1};
static IDL_MEMINT y_dim[] = {1,numberPoints1};
static IDL_STRUCT_TAG_DEF timeSeries_tags[] = {
{"X", x_dim, (void *) IDL_TYP_DOUBLE},
{"Y", y_dim, (void *) IDL_TYP_DOUBLE},
{0}};
static IDL_STRUCT_TAG_DEF cTags[]={
{"N_ITEMS", 0, (void *) IDL_TYP_INT},
{"DATA1" , 0, (void *)
timeSeries_tags},
{0}};
Can anybody give me some hints about what I am doing wrong? That would
be most appreciated.
Cheers,
Juan
|
|
|