Re: Delvar? [message #31368 is a reply to message #31225] |
Fri, 28 June 2002 13:18   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning (david@dfanning.com) writes:
> Alright. First of all, this code is inside a procedure.
> That's important. UNDEFINE looks like this:
>
> ;*********************************************************** *********
> PRO UNDEFINE, varname
> IF (N_Elements(varname) NE 0) THEN tempvar = Size(Temporary(varname))
> END
> ;*********************************************************** *********
Oh, oh. I think my problem is that I'm not anal enough. :-(
It was gently pointed out to me that, uh, the SIZE function
isn't really doing anything worthwhile here, so why put
it in?
My only excuse is that you know how these things go.
You're standing around glaring at that &#*@ down-the-line
backhand that went long *again*, and an idea suddenly
comes to you. By the time you get back to the office
the sudden clarity has turned to mush and you cast around
for inspiration. In the end, the final result contains
unmistakable marks of your own muddleheadedness.
But this is only version two of a three line program. I must
be a better programmer than I think. It usually takes me at
least five versions to get it right. :-)
;*********************************************************** *********
PRO UNDEFINE, varname
IF (N_Elements(varname) NE 0) THEN tempvar = Temporary(varname)
END
;*********************************************************** *********
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|