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

Home » Public Forums » archive » Interpreter stack not aligned properly during user return.
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: Interpreter stack not aligned properly during user return. [message #38597 is a reply to message #38429] Fri, 12 March 2004 08:40 Go to previous messageGo to previous message
Stein Vidar Hagfors H[2] is currently offline  Stein Vidar Hagfors H[2]
Messages: 28
Registered: October 2002
Junior Member
David Fanning <david@dfanning.com> writes:

> Craig Markwardt writes:
>
>>> The lesson is, of course, don't use unnecessary parentheses! To decide
>>> which parentheses are actually necessary when using pointers, arrays, and
>>> structures together, you could consult the operator precedence tutorial.
>>
>> ...or get addicted to crack cocaine. That seems easier and produces
>> the same effect. :-)
>
> That's what I was thinking, too, but I couldn't tell
> if my eyes were blurring from tiredness or just the
> effort to keep all those parentheses straight when
> I had a pointer to a structure that had a pointer....
>
> Oh, my God, I'm dizzy again!

Not to mention the *HORRIBLE* fact I discovered (the hard way) not too
long ago, that IDL goes against all common sense putting AND and OR on
equal footing wrt precedence:


IDL> print, 1 or 0 and 0
0
IDL> print, 1 or (0 and 0)
1

Yikes!!! I've used IDL for sooo many years, and heaven knows how many
statements of the form "a OR b AND c" there are in my programs,
causing unintended results! IMO they might as well abandon the whole
idea of operator precedence, switching to a clearly stated, randomized
evaluation approach. That way, everybody would know that you'd better
put in every darn parenthesis that you *think* is superfluous.

--
------------------------------------------------------------ --------------
Stein Vidar Hagfors Haugan
ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO

NASA Goddard Space Flight Center, Tel.: 1-301-286-9028
Mail Code 682.3, Bld. 26, Room G-1, Cell: 1-240-354-6066
Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL online help for v6.0 (sigh)
Next Topic: Re: cw_field: checking entries

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

Current Time: Fri Oct 10 21:57:56 PDT 2025

Total time taken to generate the page: 1.07270 seconds