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

Home » Public Forums » archive » Maximum number of keywords?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Maximum number of keywords? [message #85585] Tue, 20 August 2013 11:35 Go to next message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
Is there a maximum number of keywords allowed in IDL?

I have been using cgGraphicsKeywords__Define to create a few graphics objects. When I pass the entire list of accepted keywords into, e.g., cgContour, I get weird errors like

% Expression must be a structure in this context: YRAN


The (45th) keyword YRANGE gets cut off. If I comment out YRANGE and all keywords that follow, it works. If I comment out keywords that occur before YRANGE in the parameter list, the error occurs in a different place.
Re: Maximum number of keywords? [message #85587 is a reply to message #85585] Tue, 20 August 2013 11:44 Go to previous messageGo to next message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
I have been using the same technique as in cgZPlot. cgZPlot has too few keywords to cause this problem. cgContour and cgImage have many keywords in addition to those defined in cgGraphicsKeywords... My solution thus far has been to not use the Z[*] graphics keywords in an attempt to shorten the list.
Re: Maximum number of keywords? [message #85588 is a reply to message #85585] Tue, 20 August 2013 12:09 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Matthew Argall writes:

>
> Is there a maximum number of keywords allowed in IDL?
>
> I have been using cgGraphicsKeywords__Define to create a few graphics objects. When I pass the entire list of accepted keywords into, e.g., cgContour, I get weird errors like
>
> % Expression must be a structure in this context: YRAN
>
>
> The (45th) keyword YRANGE gets cut off. If I comment out YRANGE and all keywords that follow, it works. If I comment out keywords that occur before YRANGE in the parameter list, the error occurs in a different place.

My guess is this would be limitation of the keyword inheritance
mechanism used by Call_Procedure. You may have to call Contour, rather
than cgContour.

Cheers,

David

P.S. Always more complicated than you want it to be, verdad? :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Maximum number of keywords? [message #85589 is a reply to message #85588] Tue, 20 August 2013 12:28 Go to previous messageGo to next message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
85 keywords seems to be the limit.

> My guess is this would be limitation of the keyword inheritance mechanism used by Call_Procedure.

I am not using Call_Procedure and neither are cgZPlot or cgContour (as far as I can tell). I just follow the example in cgZPlot::DrawPlot, except instead of calling the GetProperty method, I use the object property values directly.

Is Call_Procedure used behind the scenes when keywords are inherited?

> You may have to call Contour, rather than cgContour.

Booooo

> P.S. Always more complicated than you want it to be, verdad? :-)

:-(
Re: Maximum number of keywords? [message #85591 is a reply to message #85589] Tue, 20 August 2013 12:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Matthew Argall writes:

> Is Call_Procedure used behind the scenes when keywords are inherited?

Call_Procedure!? Sorry, Coyote kept bumping into me as I was typing. I
think it is probably a limitation of the keyword inheritance mechanism,
which cgContour uses. I'm just guessing though. I think if you are
passing keywords by reference, a keyword string is created. I wouldn't
be surprised if this is the culprit here.

But, really, I'm working on about five other things today, so I don't
have a whole lot of attention on this particular topic. :-)

Maybe later today I can think about it more.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Tooltip for CW_BGROUP?
Next Topic: stacking the images according to julian date

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

Current Time: Wed Oct 08 15:07:36 PDT 2025

Total time taken to generate the page: 0.00453 seconds