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

Home » Public Forums » archive » Object Programming
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Object Programming [message #75967] Wed, 11 May 2011 12:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I guess it has been awhile since I did some extensive
object programming, but goodness, IDL doesn't like it
when you make mistakes!

I suppose I crashed IDL 25-30 times already today, both
IDL 7.1.1 and IDL 8.1. It seems as though if put a breakpoint
in an object program and then do a .RESET from the IDL
command line that IDL is certain to crash.

The error I was tracking down looked something like this:

FUNCTION foo, x, y

obj = Obj_New('foo', x, y)

RETURN, obj

END

Both routines are written in such a way that you can
pass one or two parameters. If I pass a single parameter:

IDL> obj = FOO(data)

The object INIT method was reporting that I was
passing *two* parameters (I was checking with N_Params())
and my program was getting into trouble because I assumed
y was defined in the code. It was actually passing an
undefined variable into the object INIT method. Is this
how IDL has always worked? I could have sworn I've done
this many, many times in the past without difficulty, but
perhaps I wasn't using N_Params() to check parameters
in that code.

Anyway, lesson for today: Don't make a mistake when you are
writing IDL object programs!

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: object programming question
Next Topic: Re: Significant Change in Object Programming

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

Current Time: Wed Oct 08 18:26:12 PDT 2025

Total time taken to generate the page: 0.00381 seconds