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

Home » Public Forums » archive » Re: When Ptr_New doesn't work
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: When Ptr_New doesn't work [message #29018 is a reply to message #28946] Wed, 23 January 2002 09:27 Go to previous message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
JD Smith wrote:

[...]

> The problem is with IDL's somewhat strict definition of what can
> consititute a "left-hand", or assignable, value. It handles the simple
> case of:
>
> IDL> ((((a))))=1
>
> without choking, but throw anything more complicated at the LHS, and it
> often falls down. It's a known weakness of IDL, revealed in a
> complicated way. ;) One good rule of thumb is that, if the LHS contains
> subscripts, the last character before the "=" (modulo whitespace),
> should be "]" (ok Craig, or ")").

[...]

This seems very strange to me. I think of parenthesis as not modifying
their arguments at all, since they should (in my own little idl, er,
ideal world) change only precedence and not value. Go figure. As you
say, it must be fallout from dynamic typing and/or that incomplete
operator precidence.

I am in the habit of adding parens everywhere I can when constructing
one of those long complicated lines of code from the inside out. I then
make sure the thing works, start from the outside in and remove those
that seem unneccessary. I'm completely suprised I haven't been
frustrated by this quirk before. I guess I must have never put an
outside pair on a LHS, or never noticed the error for something else.

Thanks for clearing things up, JD. It's nice to know why things are
screwy, even if it is "because that's the way they are."

Best,
Rich

--
Richard Younger MIT Lincoln Laboratory
Phone: (781)981-4464 244 Wood St.
Fax: (781)981-0122 Lexington, MA 02421
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: bug in curvefit?
Next Topic: When Ptr_New doesn't work

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

Current Time: Tue Apr 14 04:37:54 PDT 2026

Total time taken to generate the page: 0.95996 seconds