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

Home » Public Forums » archive » Re: main or procedure
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: main or procedure [message #54622 is a reply to message #54619] Wed, 20 June 2007 07:56 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Marshall Perrin writes:

> It feels odd to disagree with the great Dr. Fanning, but in this case
> I want to offer a counter-suggestion to the above advice.

Actually, we probably don't disagree. I've pretty much
given up EVER using ON_ERROR,1. If I need error handling,
I typically use a CATCH.

My impression was that the person asking the question
was not very knowledgeable about IDL. I've learned it is
better to start with the simple answers, rather than laying
the whole sordid picture out all at once. I guess we could ask
him. Sukye, did you understand ANYTHING Carsten Lechte said?

> For the original poster: The reason it returned automatically to the
> top level in your case is that you compiles a main routine (i.e.
> a file with IDL code but no "PRO whatever" or "FUNCTION whatever")
> while inside a procedure or function. That, you can't do.

I don't think this is what happened, but perhaps it is the
message that is confusing. This is the message
you get if you crash in any IDL procedure or function
and are stopped somewhere other than at the main level
and you try to compile the same procedure or function that
failed. I'd say this is 95% certain what has happened here.
A simple RETALL would eliminate the message, but, of course,
all variables created at that level would be lost. The good
news, of course, is that you will re-discover all those
variables you ACTUALLY created at the main level. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: Speed and array operations
Next Topic: memory for pixmaps: big vs many

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

Current Time: Wed Oct 08 15:55:55 PDT 2025

Total time taken to generate the page: 0.00529 seconds