JG,
I use the lines below to do keyword checking and it works great. I recommend
Ronn Kling's book, it will get you up to speed quickly.
Haje
typedef struct {
IDL_KW_RESULT_FIRST_FIELD;
int degree;
} KW_RESULT;
static IDL_KW_PAR kw_pars[] = { IDL_KW_FAST_SCAN,
{"DEGREE",IDL_TYP_LONG,1,IDL_KW_ZERO,0,IDL_KW_OFFSETOF(degree)},
{NULL}
};
KW_RESULT kw;
IDL_KWProcessByOffset(argc,argv,argk,kw_pars,0,1,&kw);
"JGG" <jargoogle@explore4life.com> wrote in message
news:4ed7753c.0408081143.38ece3f5@posting.google.com...
> Hello,
>
> I'm adapting Henry Chapman's DLM (itself modified from an earlier
> version) for calling the FFTW v3 fast fourier transform library.
>
> Henry's dlm:
>
http://groups.google.com/groups?as_umsgid=b8f3f671.031213215 8.5cda69f4@posting.google.com
>
> I'm working on an Ultra Sparc 5 running Solaris 7 using IDL version
> 5.6 and Solaris compilers. So far, so good, except that only 2 of 7
> keywords are recognized. Of the keywords, (X, Y, Z, MEDIUM, HI,
> OVERWRITE, and CLEANUP), only MEDIUM and HI are recognized.
>
> All are treated as read only input boolean keywords. In the kw_pars[]
> array, they all look something like:
>
> {"X", IDL_TYP_LONG, 1, IDL_KW_ZERO|IDL_KW_VALUE|15, 0,
> IDL_KW_OFFSETOF(x)},
>
> My IDL wrapper syntax looks something like:
>
> dataOut = fftdft3D_IDL(dataIn, direction, [x=x, y=y, z=z,
> medium=medium, $
> hi=hi, overwrite=overwrite, cleanup=cleanup])
>
> The following perform as expected:
> dataOut = fftdft3D_IDL(findgen(16,16,16), -1)
> dataOut = fftdft3D_IDL(findgen(16,16,16), -1, /medium)
> dataOut = fftdft3D_IDL(findgen(16,16,16), -1, /hi)
>
> While no other option using the keywords works:
> dataOut = fftdft3D_IDL(findgen(16,16,16), -1, /x)
> % Loaded DLM: FFTDFT3D_IDL.
> % Keyword X not allowed in call to: FFTDFT3D_IDL
> % Execution halted at: $MAIN$
>
> Now, I thought that perhaps there was an ambiguity with single letter
> keywords, but that doesn't explain why overwrite and cleanup are not
> recognized. They generate the same "not allowed" message.
>
> Yet the keywords that are "not allowed" are all syntactically the same
> as far as the c-code declarations of kw_pars[] and KW_RESULT are
> concerned.
>
> The DLM:
> MODULE fftdft3D_IDL
> DESCRIPTION 3-dimensional Complex fftw (v.3)
> VERSION $Revision: 1.0 $
> BUILD_DATE $Date: Thu Aug 5 09:19:05 MDT 2004$
> SOURCE J. Roberts
> FUNCTION fftdft3D_IDL 1 2 KEYWORDS
>
> Any ideas?
>
> Stumped,
> JG.
|