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

Home » Public Forums » archive » Re: CATCH command
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: CATCH command [message #13158] Fri, 16 October 1998 00:00
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <7055u7$3ed$1@nnrp1.dejanews.com> weitkamp@my-dejanews.com writes:

> Why doesn't CATCH catch type conversion errors? It works well with
> other errors, e. g. calls to undefined routines or out-of-range
> subscripts, but has no effect whatsoever on a line like
>
> PRINT, DOUBLE('abc')

Because a type conversion error isn't an *error* that stops
program execution in the absence of a catch statement. The
message issued is only a warning, and the program continues.

> I wonder if this is a bug or a feature. I'm using IDL 5.0 on HP-UX 10.

Feature, I'm afraid. If someone had said at the time of IDL 1.0 (or
some pretty early version) that the statement above *should* have
generated an error (stopping the execution), and gotten RSI to make it
so, it could have been considered a bug now. But AFAIK nobody has
argued strongly in this direction before. I suspect some of the (very
very poorly written!) programs out there are counting on the
conversion of 'abc' (or some other alphanumeric string) to a numerical
zero...

Regards,

Stein Vidar
[Message index]
 
Read Message
Previous Topic: Re: Strange memory consumption?
Next Topic: Strange memory consumption?

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

Current Time: Fri Oct 10 03:51:47 PDT 2025

Total time taken to generate the page: 1.01074 seconds