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

Home » Public Forums » archive » Syntax errors
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
Syntax errors [message #50747] Wed, 18 October 2006 14:19 Go to next message
Dominic Metzger is currently offline  Dominic Metzger
Messages: 30
Registered: August 2006
Member
Hi,

Me again. Why isnt it possible to suppress syntax errors in
RESOLVE_ROUTINE unless I use EXECUTE and IDL_IDLBRIDGE instead? How
come !QUIET or CATCH, ERROR wont take of it?

Or is there another way than using execute so that any errors caused by
RESOLVE_ROUTINE (including syntax errors) wont be shown / printed to
screen?


PRO LOAD_ROUTINE, ROUTINE
!QUIET=1
CATCH, ERROR
IF (ERROR NE 0) THEN RETURN
RESOLVE_ROUTINE, ROUTINE, /EITHER
END

PRO MY_PROCEDURE
...
LOAD_ROUTINE, ROUTINE
...
END

gracias

dometz
Re: Syntax errors [message #50879 is a reply to message #50747] Thu, 19 October 2006 09:55 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
mgalloy@gmail.com writes:

> I went up the "ladder of sledgehammer to pound in a nail" for
> suppressing error messages:
>
> 1. CATCH
> 2. !quiet = 1
> 3. EXECUTE(..., 1)
> 4. IDL_IDLBridge
> 5. Callable IDL
>
> The first three didn't do it. So I did #4 (I'm not going to do #5, but
> feel free). There may be other techniques out there, but I didn't think
> of any others.

I think you forgot "Get Lajos to put the damn thing
into FL and use that." :-)

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.")
Re: Syntax errors [message #50880 is a reply to message #50747] Thu, 19 October 2006 09:47 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
Dometz wrote:
> Me again. Why isnt it possible to suppress syntax errors in
> RESOLVE_ROUTINE unless I use EXECUTE and IDL_IDLBRIDGE instead? How
> come !QUIET or CATCH, ERROR wont take of it?

Is this a philosophical question? I guess I'm practically minded (or
used to this kind of thing in IDL).; accept it or file a feature
request with ITTVIS.

> Or is there another way than using execute so that any errors caused by
> RESOLVE_ROUTINE (including syntax errors) wont be shown / printed to
> screen?

I went up the "ladder of sledgehammer to pound in a nail" for
suppressing error messages:

1. CATCH
2. !quiet = 1
3. EXECUTE(..., 1)
4. IDL_IDLBridge
5. Callable IDL

The first three didn't do it. So I did #4 (I'm not going to do #5, but
feel free). There may be other techniques out there, but I didn't think
of any others.

Mike
--
www.michaelgalloy.com
Re: Syntax errors [message #50888 is a reply to message #50747] Thu, 19 October 2006 05:46 Go to previous messageGo to next message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
Dometz,

How about:

resolve_all,/continue_on_error,/quiet

This, of course, just won't compile routines which have errors but I
guess that's what you want?

Thanks,

Allan

Dometz wrote:
> Hi,
>
> Me again. Why isnt it possible to suppress syntax errors in
> RESOLVE_ROUTINE unless I use EXECUTE and IDL_IDLBRIDGE instead? How
> come !QUIET or CATCH, ERROR wont take of it?
>
> Or is there another way than using execute so that any errors caused by
> RESOLVE_ROUTINE (including syntax errors) wont be shown / printed to
> screen?
>
>
> PRO LOAD_ROUTINE, ROUTINE
> !QUIET=1
> CATCH, ERROR
> IF (ERROR NE 0) THEN RETURN
> RESOLVE_ROUTINE, ROUTINE, /EITHER
> END
>
> PRO MY_PROCEDURE
> ...
> LOAD_ROUTINE, ROUTINE
> ...
> END
>
> gracias
>
> dometz
>
Re: Syntax errors [message #50913 is a reply to message #50880] Mon, 23 October 2006 13:08 Go to previous messageGo to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Thu, 19 Oct 2006 09:47:43 -0700, mgalloy@gmail.com wrote:
> Dometz wrote:
>> Me again. Why isnt it possible to suppress syntax errors in
>> RESOLVE_ROUTINE unless I use EXECUTE and IDL_IDLBRIDGE instead? How
>> come !QUIET or CATCH, ERROR wont take of it?
>
> The first three didn't do it. So I did #4 (I'm not going to do #5, but
> feel free). There may be other techniques out there, but I didn't think
> of any others.

Why not simply call IDL like:

idl -arg routine verify_routine.pro 2>/dev/null

then you won't be bothered with all those pesky error messages?

JD
Re: Syntax errors [message #50960 is a reply to message #50747] Thu, 26 October 2006 10:19 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 25 Oct 2006 23:23:22 -0600, Michael Galloy wrote:

> Dometz wrote:
>> [quoted text muted]
>
> That's right. If you need a single session with all the routines in it, I
> would make a single IDL_IDLBridge and then repeatedly compile routines in
> it. If you are going to check a lot of routines, I would do this anyway
> since there is so much overhead in creating an IDL_IDLBridge.

How much overhead is it? How much processing do you need to do in a
the Bridge for it to be worth it to start up?

JD
Re: Syntax errors [message #50969 is a reply to message #50747] Wed, 25 October 2006 22:23 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
Dometz wrote:
> I used the code from:
> http://groups.google.com/group/comp.lang.idl-pvwave/tree/bro wse_frm/thread/3440e343f95bdd62/0b00aaec3e114be9?rnum=11& ;_done=%2Fgroup%2Fcomp.lang.idl-pvwave%2Fbrowse_frm%2Fthread %2F3440e343f95bdd62%2F071a7131acc5184b%3F#doc_c3f7eca04ca4e9 4f
> to create an idl-bridge.
>
> The syntax error messages are gone :-D BUT it doesnt seem that the
> methods are loaded in the original idl instance but only in the newly
> created IDL sessions.

That's right. If you need a single session with all the routines in it,
I would make a single IDL_IDLBridge and then repeatedly compile routines
in it. If you are going to check a lot of routines, I would do this
anyway since there is so much overhead in creating an IDL_IDLBridge.

Mike
--
www.michaelgalloy.com
Re: Syntax errors [message #50988 is a reply to message #50880] Wed, 25 October 2006 13:48 Go to previous message
Dominic Metzger is currently offline  Dominic Metzger
Messages: 30
Registered: August 2006
Member
Hey Mike,

I used the code from:
http://groups.google.com/group/comp.lang.idl-pvwave/tree/bro wse_frm/thread/3440e343f95bdd62/0b00aaec3e114be9?rnum=11& ;_done=%2Fgroup%2Fcomp.lang.idl-pvwave%2Fbrowse_frm%2Fthread %2F3440e343f95bdd62%2F071a7131acc5184b%3F#doc_c3f7eca04ca4e9 4f
to create an idl-bridge.

The syntax error messages are gone :-D BUT it doesnt seem that the
methods are loaded in the original idl instance but only in the newly
created IDL sessions.

thanks,

dometz

mgalloy@gmail.com wrote:
> Dometz wrote:
>> Me again. Why isnt it possible to suppress syntax errors in
>> RESOLVE_ROUTINE unless I use EXECUTE and IDL_IDLBRIDGE instead? How
>> come !QUIET or CATCH, ERROR wont take of it?
>
> Is this a philosophical question? I guess I'm practically minded (or
> used to this kind of thing in IDL).; accept it or file a feature
> request with ITTVIS.
>
>> Or is there another way than using execute so that any errors caused by
>> RESOLVE_ROUTINE (including syntax errors) wont be shown / printed to
>> screen?
>
> I went up the "ladder of sledgehammer to pound in a nail" for
> suppressing error messages:
>
> 1. CATCH
> 2. !quiet = 1
> 3. EXECUTE(..., 1)
> 4. IDL_IDLBridge
> 5. Callable IDL
>
> The first three didn't do it. So I did #4 (I'm not going to do #5, but
> feel free). There may be other techniques out there, but I didn't think
> of any others.
>
> Mike
> --
> www.michaelgalloy.com
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Mac 64-bit
Next Topic: Re: Commutativity of multiplication

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

Current Time: Wed Oct 08 15:49:01 PDT 2025

Total time taken to generate the page: 0.00744 seconds