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

Home » Public Forums » archive » Minor obscure error message
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: Minor obscure error message [message #91816 is a reply to message #91815] Tue, 01 September 2015 14:50 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Hi Wayne,

I think this is why: if there is an "&" indicating multiple statements, then "implied print" is not attempted at all on any of them. In your first example, IDL tried to interpret it as a method call on !p (and failed, with no message), then tried to interpret it as an implied print, and failed. Second time, IDL tried as a method call on !p, and that failed. Due to the "&", it did not try implied print, so it reported the first failure.

Here's a simpler example to show a similar effect:

IDL> !Pi
3.1415927
IDL> !Pi & !DPi
% Attempt to call undefined procedure: '!PI'.

Cheers,
-Dick

Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com

On Tuesday, 1 September 2015 12:12:35 UTC-7, wlandsman wrote:
> Suppose one wants to write !p.thick=2 but forgets the equals sign
>
> IDL> !p.thick2
> % Tag name THICK2 is undefined for structure !PLT.
> % Execution halted at: $MAIN$
>
> and one gets a very logical error message.
>
> But if one precedes this with the syntactically correct statement !p.background=0
>
> IDL> !p.background=0 & !p.thick2
> % Object reference type required in this context: <STRUCT Array[1]>.
> % Execution halted at: $MAIN$
>
> one gets an obscure reference about requiring an object type. I'm not sure how IDL is getting confused here. It only happens when the two statements are on the same line.
>
> IDL> print,!version
> { x86_64 linux unix linux 8.4 Sep 27 2014 64 64}
>
>
> --Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Writing programs to use static methods but still compile in IDL 7
Next Topic: keyword inheritance in object graphics

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

Current Time: Wed Oct 08 18:21:18 PDT 2025

Total time taken to generate the page: 0.00456 seconds