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 
Switch to threaded view of this topic Create a new topic Submit Reply
Interpreter stack not aligned properly during user return. [message #38381] Fri, 05 March 2004 07:32 Go to next message
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
Interpreter stack not aligned properly during user return.

Can anyone help about this error message? What may cause this?

By the way. Is, in IDL tutorials, a section what interpreting error
messages?

Cheers,

Nuno.
Re: Interpreter stack not aligned properly during user return. [message #38429 is a reply to message #38381] Mon, 08 March 2004 20:15 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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!

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Interpreter stack not aligned properly during user return. [message #38430 is a reply to message #38381] Mon, 08 March 2004 19:16 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
JD Smith <jdsmith@as.arizona.edu> 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. :-)

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: Interpreter stack not aligned properly during user return. [message #38432 is a reply to message #38381] Mon, 08 March 2004 12:17 Go to previous messageGo to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Fri, 05 Mar 2004 10:56:06 -0700, David Fanning wrote:

> David Fanning writes:
>
>> I'll write this one down. It's worth remembering.
>
> Oh, I *had* this one written down already. (Probably why I
> vaguely remembered it.) It used to issue a different
> error message. It used to say "Temporary Variables Still
> Checked Out". Now it says, "Internal error: The Interpreter
> stack is not empty on exit."
>
> http://www.dfanning.com/code_tips/tempvar.html
>
> This message is *so* much better! :-)

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.

JD
Re: Interpreter stack not aligned properly during user return. [message #38458 is a reply to message #38381] Fri, 05 March 2004 09:56 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> I'll write this one down. It's worth remembering.

Oh, I *had* this one written down already. (Probably why I
vaguely remembered it.) It used to issue a different
error message. It used to say "Temporary Variables Still
Checked Out". Now it says, "Internal error: The Interpreter
stack is not empty on exit."

http://www.dfanning.com/code_tips/tempvar.html

This message is *so* much better! :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Interpreter stack not aligned properly during user return. [message #38460 is a reply to message #38381] Fri, 05 March 2004 09:35 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nuno Oliveira writes:

> Well, mask is indeed a tag of a pointer to structures. But the question is
> that the question was solved only by removing the parenthesis.

Ah, right. Now I remember. Well done. And you can still make
that hot date tonight! :-)

I'll write this one down. It's worth remembering.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Interpreter stack not aligned properly during user return. [message #38463 is a reply to message #38381] Fri, 05 March 2004 09:16 Go to previous messageGo to next message
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
Seems that the only error was that I was doing

(mask)[indices] = 255b

instead of

mask[indices] = 255b



Well, mask is indeed a tag of a pointer to structures. But the question is
that the question was solved only by removing the parenthesis.


"Nuno Oliveira" <nmoliveira@fc.ul.pt> wrote in message
news:c2a6n4$fhn$1@pegasus.fccn.pt...
> Interpreter stack not aligned properly during user return.
>
> Can anyone help about this error message? What may cause this?
>
> By the way. Is, in IDL tutorials, a section what interpreting error
> messages?
>
> Cheers,
>
> Nuno.
>
Re: Interpreter stack not aligned properly during user return. [message #38569 is a reply to message #38381] Fri, 12 March 2004 18:28 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Stein Vidar Hagfors Haugan wrote:
> 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:

I guess I am betraying my lack of commone sense here, but which of these
do you think *should* take precedence?

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: Interpreter stack not aligned properly during user return. [message #38580 is a reply to message #38381] Fri, 12 March 2004 12:45 Go to previous message
Stein Vidar Hagfors H[2] is currently offline  Stein Vidar Hagfors H[2]
Messages: 28
Registered: October 2002
Junior Member
Craig Markwardt <craigmnet@REMOVEcow.physics.wisc.edu> writes:

> Stein Vidar Hagfors Haugan <steinhh@astro.uio.no> writes:
>> .... That way, everybody would know that you'd better
>> put in every darn parenthesis that you *think* is superfluous.
>
> Except when extra parentheses cause misaligned stack errors. :-)

Well, at least you get an error message, not simply a quiet
calculation of the wrong result ;-)

--
------------------------------------------------------------ --------------
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
------------------------------------------------------------ --------------
Re: Interpreter stack not aligned properly during user return. [message #38589 is a reply to message #38381] Fri, 12 March 2004 09:15 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Stein Vidar Hagfors Haugan <steinhh@astro.uio.no> writes:
> .... That way, everybody would know that you'd better
> put in every darn parenthesis that you *think* is superfluous.

Except when extra parentheses cause misaligned stack errors. :-)

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
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 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
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 13:39:17 PDT 2025

Total time taken to generate the page: 0.00740 seconds