comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Passing keywords to DLM
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Passing keywords to DLM [message #40353 is a reply to message #40351] Mon, 09 August 2004 11:34 Go to previous messageGo to previous message
jargoogle is currently offline  jargoogle
Messages: 11
Registered: April 2004
Junior Member
Haje,

"Haje Korth" <haje.korth@jhuapl.edu> wrote in message news:<cf7tm7$k8a$1@aplcore.jhuapl.edu>...

> 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


Thanks. I'll have to look up Kling's book. I use nearly the same
syntax as you indicated in your email, except that I have 7 keywords
instead of 1. The code compiles without error messages and functions
correctly with no keywords. With keywords, the code accepts only 2 of
the 7 defined and reports that the other 5 keywords are "not allowed"
in the call to the function.

If none of them worked, I'd at least look for a syntactical error.
But since 2 of the 7 are recognized and all are declared exactly the
same way, I'm at a loss.

Here are my declaration statements (keywords medium and hi function
correctly while the others cause "keyword not allowed" errors to be
issued by IDL. See my previous posting.):

typedef struct {
IDL_KW_RESULT_FIRST_FIELD;
IDL_LONG x;
IDL_LONG y;
IDL_LONG z;
IDL_LONG medium;
IDL_LONG hi;
IDL_LONG overwrite;
IDL_LONG cleanup;
} KW_RESULT;
static IDL_KW_PAR kw_pars[] = {
IDL_KW_FAST_SCAN,
{"X", IDL_TYP_LONG, 1, IDL_KW_ZERO|IDL_KW_VALUE|15, 0,
IDL_KW_OFFSETOF(x)},
{"Y", IDL_TYP_LONG, 1, IDL_KW_ZERO|IDL_KW_VALUE|15, 0,
IDL_KW_OFFSETOF(y)},
{"Z", IDL_TYP_LONG, 1, IDL_KW_ZERO|IDL_KW_VALUE|15, 0,
IDL_KW_OFFSETOF(z)},
{"HI", IDL_TYP_LONG, 1, IDL_KW_ZERO|IDL_KW_VALUE|15, 0,
IDL_KW_OFFSETOF(hi)},
{"OVERWRITE", IDL_TYP_LONG, 1, IDL_KW_ZERO|IDL_KW_VALUE|15, 0,
IDL_KW_OFFSETOF(overwrite) },
{"MEDIUM", IDL_TYP_LONG, 1, IDL_KW_ZERO|IDL_KW_VALUE|15, 0,
IDL_KW_OFFSETOF(medium) },
{"CLEANUP", IDL_TYP_LONG, 1, IDL_KW_ZERO|IDL_KW_VALUE|15, 0,
IDL_KW_OFFSETOF(cleanup) },
{NULL}
};
KW_RESULT kw;

(void) IDL_KWProcessByOffset(argc, argv, argk, kw_pars,
(IDL_VPTR *) 0, 1, &kw);

Maybe I shouldn't use IDL_KW_VALUE? I adopted the same syntax here as
in the example given in the 5.6 manual as well as Henry Chapman's
similar DLM.

The DLM is included in my previous post.

Still stumped,
JGG.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: IDL 6.1 released
Next Topic: Re: Can I have multiple threads in IDL?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 07:51:27 PDT 2025

Total time taken to generate the page: 0.08296 seconds